Home › Forums › Back End › How to pull post if only in both categories › Reply To: How to pull post if only in both categories
February 21, 2015 at 5:31 am
#196488
Senff
Participant
$args = array(
'category__and' => array(1770730, 690754)
);
$the_query = new WP_Query( $args );
if( $the_query->have_posts() ):
while ( $the_query->have_posts()) : $the_query->the_post();
get_template_part('content');
endwhile;
endif;
wp_reset_query();