Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args = array(
- 'post_type' => 'custom_post_type',
- 'tax_query' => array(
- array(
- 'taxonomy' => 'people',
- 'field' => 'slug',
- 'terms' => 'bob',
- ),
- ),
- );
- $query = new WP_Query( $args );
- while ( $query->have_posts() )
- {
- $query->the_post();
- echo '<h1>' . $post->post_title. '</h1';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement