Skip to content

Instantly share code, notes, and snippets.

@boyvanamstel
Created April 11, 2011 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boyvanamstel/913785 to your computer and use it in GitHub Desktop.
Save boyvanamstel/913785 to your computer and use it in GitHub Desktop.
Displays posts in the future.
<?php
$my_query = new WP_Query('post_status=future&order=DESC&showposts=5');
if ($my_query->have_posts()) {
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<?php the_date(); ?> - <?php the_title(); ?>
<?php endwhile;
}
// Source: http://www.studionashvegas.com/tutorial/displaying-future-posts-in-wordpress/
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment