Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php wp_reset_query(); // Restore global post data stomped by the_post(). ?>
- <?php
- // args
- $args = array(
- 'numberposts' => -1,
- 'post_type' => 'page',
- 'meta_key' => 'feature_on_front_page',
- 'meta_value' => 'featured'
- );
- // query
- $the_query = new WP_Query( $args );
- ?>
- <?php if( $the_query->have_posts() ): ?>
- <ul>
- <?php while( $the_query->have_posts() ) : $the_query->the_post(); ?>
- <li>
- do some stuff
- </li>
- <?php endwhile; ?>
- </ul>
- <?php endif; ?>
- <?php wp_reset_query(); // Restore global post data stomped by the_post(). ?>
- 'meta_value' => array('Featured' => 'featured')
- 'meta_value' => array('featured')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement