1$the_query = new WP_Query( array(
2 'post_type' => 'Adverts',
3 'tax_query' => array(
4 array (
5 'taxonomy' => 'advert_tag',
6 'field' => 'slug',
7 'terms' => 'politics',
8 )
9 ),
10) );
11
12while ( $the_query->have_posts() ) :
13 $the_query->the_post();
14 // Show Posts ...
15endwhile;
16
17/* Restore original Post Data
18 * NB: Because we are using new WP_Query we aren't stomping on the
19 * original $wp_query and it does not need to be reset.
20*/
21wp_reset_postdata();