When you work as a website admin or a blog writer then you want to maintain the curiosity of the visitors or the readers. In both cases the excitement of the other person matters a lot. It helps you to build more traffic on your page. When you work in WordPress then this excitement can be now build up by scheduling your future posts. By using this feature you inform your users that something new and exciting will come up in a few hours. In this tutorial article we will guide you that how you can generate the listing for your upcoming posts.
To schedule your posts, first you need to assign future dates and schedule your posts. After this open the space where you want to list your future post. It can be sidebar.php, top of the page or the bottom of the page. Now type the following code.
<?php query_posts('posts_per_page=10&post_status=future'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<span class="datetime"><?php the_time('j. F Y'); ?></span></p>
else: ?><p>No future events scheduled.</p>
<?php endif; ?>
In this code you can also limit the per day number of posts by using a parameter