I have this code that should get all custom post’s “testimonials” that are in a specific custom taxonomies “testimonial_categories”.
The problem is that the code works only when i am logged in as admin and it fails and shows all the testimonials when i log off and usign the website as simple user..
What could be the issue here? Is there an error in my code ?
<?php $args = array( 'post_type' => 'testimonials', 'tax_query' => array ( array ( 'taxonomy' => 'testimonial_categories', 'field' => 'slug', 'terms' =>$testim_cats ) ), 'orderby' => 'date', 'order' => 'DESC' ); $query = new WP_Query( $args ); ?>
- The topic ‘how to tax_query the right way ?’ is closed to new replies.