how to tax_query the right way ? (1 post)

  1. anghelgabriel
    Posted 3 years ago #

    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 ?

                         $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 );

Topic Closed

This topic has been closed to new replies.

About this Topic