Articles of custom taxonomy

Print all the tags from a custom post type

I need to print all the tags links which i used in custom post type. Name of Custom post type= mobile Taxonomy tag slug = brand <?php $terms = get_terms( ‘brand’ ); $count = count( $terms ); if ( $count > 0 ) { echo ‘<ul>’; foreach ( $terms as $term ) {?> <a href=”<?php […]

Changing CPT slug and taxonomy already registered in parent theme

I’m using Read WP (premium) with childthime. This theme have Portfolio CPT (slug: potfolio) declared in functions.php. Each project can be nested in a Department (slug: department). If i want to see only one specific department, the URL will be something like this: mysite.com/department/category-name. If I want to see one specific projet, the URL will […]

Get posts by Taxonomy without terms

Is there a way to get posts from a custom taxonomy without specifying a term? I have a custom taxonomy called media_category and I want to get all the attachments which use this taxonomy since I have some attachments which doesnt use this taxonomy at all.

Replicating category/location page heirarchy

Looking for advice, recommendations or suggestions for the most appropriate page structure for a website. I am migrating a website which has about 1000 pages in the structure of /service/location/ – There are 4 services and about 250 locations I leaning away from creating them as pages as it will just clog up the Pages […]

Creating custom Woocommerce attribute taxonomies from a plugin

I’ve made a plugin to import products to WordPress with Woocommerce. It works fine except the product attributes – I can’t find a way to import them properly. The issue is that with products I add custom taxonomies which are not defined in the dashboard. Surprisingly I can’t find a method for this. I tried […]

How to get attached image to taxonomy..?

I am using taxonomy and I need to get attached image to taxonomy. I have renamed my wp-content folder. After that I cannot retrieve the image path. I used <?php bloginfo(‘url’); ?>/renamed-folder/uploads/<?php echo get_post_meta(get_my_taxonomy_fields($set->term_id, ‘upload_image’), ‘_wp_attached_file’, true); ?> So, my image code is <img src=”<?php bloginfo(‘url’); ?>/renamed-folder/uploads/<?php echo get_post_meta((get_my_taxonomy_fields($set->term_id, ‘upload_image’), ‘_wp_attached_file’, true); ?>” alt=”<?php echo […]

How to show post list based on taxonomy term?

I have a CPT named “football_fixture”.This CPT has taxonomy named “competition”, and this taxonomy has different terms , laliga, eng. I want to show my post as follow: laliga: List of all posts published including above terms. eng: List of all posts published including above terms. I am using following codes but it show the […]

Custom Taxonomy archive returns 404

I made custom post type with one taxonomy. Everything was good except pagination on taxonomy. Firstly, without any changes, I was able to switch pages on main custom post type archive: website.com/custom_post_type_name/page/x But when I wanted to jump to taxonomy and switch pages I got 404 error. website.com/custom_post_type_name/taxonomy_slug/page/x I tried doing regex from answer from […]

List Top 5 taxonomy terms based on number of post

One of my taxonomy is “team” and another one is “players”. I am trying to list top 5 taxonomy based on a number of today’s post. Please let me know how can I do that.

How to filter custom post types by custom category taxonomy

I’m running WordPress 4.6.1 and I am trying to learn how to filter custom post types by a category taxonomy process. This is very helpful as non-technical folks can easily filter custom post type posts by category in the admin. This is my setup… I’m building a child theme off of tweentysixteen I created and […]