Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args = array(
- 'post_type' => 'clients-placements',
- 'posts_per_page' => -1,
- 'post_status' => 'publish',
- 'order' => 'ASC',
- 'meta_query' => array(
- array(
- 'key' => 'type',
- 'value' => 'Client'
- ),
- array(
- 'key' => 'featured',
- 'value' => 'yes'
- )
- )
- );
- $the_query = new WP_Query( $args );
- ?>
- <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
- <?php get_template_part( 'content', 'clients' );?>
- <ul id="placements">
- <?php
- $args = array(
- 'post_type' => 'clients-placements',
- 'posts_per_page' => -1,
- 'post_status' => 'publish',
- 'order' => 'ASC',
- 'post_parent' => $post->ID,
- 'meta_query' => array(
- array(
- 'key' => 'type',
- 'value' => 'Placement',
- ),
- array(
- 'key' => 'featured',
- 'value' => 'yes',
- )
- )
- );
- $the_query = new WP_Query( $args );
- // The Loop
- while ( $the_query->have_posts() ) : $the_query->the_post();
- echo '<li>';
- the_title();
- the_content();
- echo '</li>';
- endwhile;
- ?>
- </ul>
- <?php endwhile; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement