How to display future posts in WordPress

Including future posts in a WordPress loop is quite easy with the usage of simple query_posts with some arguments. Below is a working code which will display the future posts on WordPress site. Just copy and paste it on the template where you want to show future posts.

	<?php query_posts('showposts=5&post_status=future'); ?>
	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
		<div class="future-posts">
			<p class><b><?php the_title(); ?></b><?php edit_post_link('e',' (',')'); ?><br>
			<span class="datetime"><?php the_time('j. F Y'); ?></span></p>
	<?php endwhile; else: ?><p>No future posts.</p><?php endif; ?>

Related posts:

HTML5 page structure

HTML5 offers more powerful structure comparing to older versions of Html. There are many new …

Partner with Us

We are providing an exclusive partnership offer to individuals and companies who are interested in setting up their own web design & development company. For more information about how to partner with us, please contact us