Articles of custom taxonomy

Custom taxonomy term in WooCommerce product permalink

I’ve created a custom taxonomy for the product post type created by WooCommerce. I want to use this taxonomy to the permalinks of the products. I stumbled upon this which seemed to be perfect for what I wanted to do. However, I’m having little luck getting it to work. Adding the code in the post […]

taxonomy template for custom post type the same as the archive

It seems simple but I haven’t found an answer…. I have a custom post type ‘team’ with a taxonomy ‘department’ I have an archive page archive-team.php that shows all team posts. When I need to show a department I want to use the same template, just with the taxonomy as a filter. But it doesn’t*. […]

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 […]