Testimonial Query
// WP_Query arguments
$args = array(
'post_type' => array( 'testimonial' ),
'tax_query' => array(
array(
'taxonomy' => 'testimonial_category',
'terms' => '$review_cat',
'field' => 'term_id',
'operator' => 'IN',
),
),
);
// The Query
$review_cat_query = new WP_Query( $args );
// The Loop
if ( $review_cat_query->have_posts() ) {
while ( $review_cat_query->have_posts() ) {
$review_cat_query->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();