Posted on 7 June, 2010 By 19 Comments

3 Ways to List Upcoming Posts in WordPress

 

If you schedule your WordPress posts and want your visitors to get excited about what’s coming soon, you can list them in your sidebar.

I always schedule my posts and frequently write 5-6 posts at a time when I have a block of time and schedule them over the next couple of weeks. I get a little stressed out if I don’t have something scheduled and have to write something the night before. Anyway …

I don’t think I would use this feature because I don’t want to spoil the surprise. This is probably why I didn’t want to know the gender of my child when I had an ultrasound ;-) But, for certain types of sites, I think this could be a really useful feature.

There are two plugin solutions and one code solution. And even though I don’t want to use this feature I went ahead and tested the plugins. Yeah, you can thank me later.

The code

This code snippet is from WP Recipes and takes advantage of the attribute post_status=future. This can be used on a template where you want the posts to be listed. It will work in a Text Widget if you are using a plugin like Exec-Php, which allows code to be run in text widgets. (I tested it.) It will also work in a non-widgetized sidebar.

<?php
$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>3 Ways to List Upcoming Posts in WordPress</li>
    <?php endwhile;
}
?>

Two Plugin Solutions

I tested both of these plugins because they hadn’t been updated in awhile and they both worked fine. I did find, however, that they don’t like being activated at the same time. When they are both active, the widget for only one of them shows up in the list of widgets. Maybe they are too similar.

Upcoming Posts Widget

This plugin creates an Upcoming Posts widget that works much like the Recent Posts widget. You can give it a title and select how many future posts will be listed. And that’s it.

I found that the list of upcoming posts was styled differently than my other widgets – the lists of posts was bold – so, if I were going to use this I would have to tweak my stylesheet a little. I don’t know if everyone will experience the same issue or not.

Upcoming Posts

This plugin is much like the previous one in that it adds and Upcoming Posts widget. This one, however, has more features than the first one.

You can give it a title, select how many posts will be listed, display upcoming posts from a specific category, include a timestamp, include an excerpt, and more. If I were going to use these plugins I would probably go with the this one because of the additional features but there are instances when the simpler one would be sufficient.

Do you schedule posts? Would listing upcoming or future posts be useful for you?

photo credit: ILMO JOE


Digging Into WordPress

Keep Reading:
Posted In : WordPress Plugins | WordPress Tips

Did you enjoy this article? I can assist you with your WordPress or Facebook project. Contact me and I will provide you with an estimate. You can also connect with me on Facebook or follow me on Twitter. If you are looking for Hosting, WordPress Theme, Newsletter or other recommendations, please view my detailed list.




19 Responses to “3 Ways to List Upcoming Posts in WordPress”

Leave a Comment
You may use: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .

CommentLuv badge

About

Kim Woodbridge is an accomplished Information and Technical Consultant specializing in the entire implementation of a WordPress based website including installation, theme design, upgrades, unique customizations and ongoing site maintenance.

Recent Comments

    • Chris Tusa: NovelSnippet.com is cool. It contains hundreds of books (and seems to be rapidly growing). The books are accompanied by ...
    • Dee: I drop a leave a response when I especially enjoy a post on a site or I have something to contribute to the conversation...
    • Kabsiha: Thanks for your great idea to hide the deactivated comment link in word press this would be the very useful post for who...
    • Pat Alexander: Well now these are really great. Makes it perfect for small sites....
    • Tracy G: I really don't know how to do it, glad you posted it here....

Wordpress Services

  • Installation, upgrades and maintenance
  • Conversion of existing html and css templates
  • Theme and plugin recommendations
  • CSS customizations
  • Troubleshooting and tweaks for unique situations
  • Customization for individual blogging goals and needs
  • Training and advice