WordPress tutorials: Display future posts

Wpsnipp – Small Plugin to display future posts as a list. You can use the sidebar widget or you call the method display_future_posts() to display the future posts where ever you want.Adding this code to your wordpress theme will display a listing of future posts to be published.

 

 

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

Leave a comment