Articles of custom taxonomy

WordPress custom permalink and archive link for custom post type

I have custom post type venue and custom taxonomy ‘facility’ and ‘types’, is it possible to generate custom permalinks for the single post and archive with current posts taxonomy slug. Example: single post term facility slug is ‘restaurant’ archive page My custom post declaration $args = array( ‘label’ => __( ‘Venue’, ‘weera’ ), […]

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