How to List Scheduled Posts in WordPress

By on Dec 14, 2010 in Wordpress Tutorials |

Share On GoogleShare On FacebookShare On Twitter

schedule postsOne can schedule posts in wordpress to be published on later dates or after some hours or days it may be anything depending on your need.If you are going for vacation you can schedule posts to be published when you are not available to update your blog.

You can show you visitors the scheduled posts in sidebar to do so just open sidebar.php and paste the following code:

$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();
        $do_not_duplicate = $post->ID; ?>
        <li><?php the_title(); ?></li>
    <?php endwhile;

That’s all you are done now this will show the scheduled posts in your sidebar.