Introducing sub categories into the URL
Introducing sub categories into the URL
Introducing sub categories into the URL
How to Filter the Custom term loop based on dropdown
Changing the ‘orderby’ => ‘taxonomy’ to ‘orderby’ => ‘term_order’ should to the trick.
edit index custom post type page with elementor or other
Include posts with a specific custom taxonomy term in author page
There are 2 possible ways to fix the issue with the term’s permalinks (which is currently using the wrong query var name – intvn-cat): Easy. Just set the 3rd parameter for add_rewrite_tag() to intervention_cat=. I.e. add_rewrite_tag( ‘%intvn-cat%’, ‘(.+)’, ‘intervention_cat=” ); This is what I would actually do – Remove the add_rewrite_tag() part in your code, … Read more
I dont know how I missed out on that while looking for aproaches, but I have a working solution now based on this answer. I modified it to check for slashes in $query->request, if there is none I first look for my custom post type (get_posts() with’slug’ => $query->request). If no post is found I … Read more
After much searching, and lots of help here (thanks again, Sally CJ), this the code I ended up using. $category_terms = get_terms(array(‘taxonomy’ => ‘categories’)); $series_terms = get_terms(array(‘taxonomy’ => ‘series’)); $custom_post_type=”cpt”; foreach( $category_terms as $category_term ) { foreach ($series_terms as $series_term) { $args = array( ‘post_type’ => $custom_post_type, ‘showposts’ => ‘5000’, ‘meta_key’ => ‘available_date’, ‘tax_query’ => … Read more
I have finally found a solution and for anyone interested, here is the working code : <?php // The Query if (is_tax() || is_category() || is_tag() ){ $qobj = $wp_query->get_queried_object(); // concatenate the query $args = array( ‘post_type’ => ‘houses’, ‘posts_per_page’ => -1, ‘orderby’ => ‘title’, ‘order’ => ‘ASC’, ‘tax_query’ => array( array( ‘taxonomy’ => … Read more
You could consider using is_tax: Determines whether the query is for an existing custom taxonomy archive page. You can pass in the taxonomy slug to test if the current taxonomy archive page is for your taxonomy: if ( is_tax( ‘my_taxonomy’ ) ) {