You're here: Home » WordPress » Display Scheduled Posts

Display Scheduled Posts

On Aug 26, 2011 under WordPress

Showing your scheduled posts will create interest to your blog readers and it will make them to visit your blog more often. Showing scheduled posts will create a crowd for a post even before it gets published. With a simple php function you can easily display the scheduled posts anywhere on your blog. I generally prefer to show scheduled posts in footer or sidebar. Some bloggers create a separate page template for showing scheduled posts. Choice is yours.

Simply paste the below code in your theme files where you to show the list of scheduled posts.

<?php
$my_query = new WP_Query('post_status=future&order=DESC&showposts=10');
if ($my_query->have_posts()) {
    while ($my_query->have_posts()) : $my_query->the_post(); ?>
        <li><?php the_title(); ?></li>
    <?php endwhile;
}
?>

In the above code I have set the number of posts as 10. You can increase the limit.

Comments on this entry (5 comments)

Did you like this post? You can share your opinion with us! Simply click here.

  1. web stats says:

    Nice function. Thanks for sharing this information. Configuration is very simple. I used it by myself, no trouble what so ever. Really enjoy after using this exciting feature.

Leave a Reply

CommentLuv badge