Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $query_options = array(
- 'post__in' => get_option('sticky_posts'),
- 'meta_query' => array(
- array('key' => '_thumbnail_id')
- )
- );
- $stickies = new WP_Query( $query_options );
- echo "<p>post_count is $stickies->post_count and found_posts is $stickies->found_posts</p>";
- if( $stickies->have_posts() ):
- ?>
- <div id="slider">
- <?php while( $stickies->have_posts() ) : $stickies->the_post(); ?>
- <div>Slider content for <?php the_title(); ?> omitted</div>
- <?php endwhile; ?>
- </div>
- <?php endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement