Skip to content

Show off Your Upcoming Posts to Spark Interest

24 Jan 2011 (Updated: 9 Jan 2012) • 6 comments Code, Snippets, Wordpress

Showing your upcoming posts is a great way of securing more subscribers

I’ve long wanted to be able to show my visitors the upcoming tutorials on my site so that they might be intrigued enough to subscribe to my feed or subscribe to my newsletter so that they don’t miss out on them.

All the tutorials I had seen, didn’t cover it quite the way I wanted, so I set about creating my own code for it.

I wanted it to display the next three posts that were to be published on my site. Most of the tutorials I had seen showed the three posts that had the latest scheduled post date, meaning that other posts would be posted before any of those were ever posted.

So if you want to create a little widget that displays the upcoming stories on your blog that are next to be published, use the following code:

<?php
$my_query = new WP_Query('post_status=future&order=ASC&showposts=3');
if ($my_query->have_posts()) {
    while ($my_query->have_posts()) : $my_query->the_post();
        $do_not_duplicate = $post->ID; ?>
        <ul><li><?php the_title(); ?></li></ul>
    <?php endwhile;
}
?>

You can modify it a little to your exact needs. For example, to change the number of posts displayed, just change the bit that says showposts=3.

Now you just need to drop it into sidebar.php (or wherever else you want to display it) and add a little styling to make it look just right.

Where have you ended up using this little trick? Have you seen an increase in sign-up rates?

UPDATE:

Show Off Upcoming Posts Plugin

It’s now a whole lot easier to implement this code into your site, as I have created a plugin which creates the widget.

SOUP (Show Off Upcoming Posts) creates the widget for you and allows you to dictate what the widget title should be and how many scheduled posts it should display.

Read more about SOUP and download it now.

Recommended WordPress Hosting

Save 25% on HostGator hosting packages by using coupon DIWW25PCOFF
Or save $9.94 by using coupon DIWWSAVE10
Hosting packages for WordPress

About the Author

Dave Clements designs awesome websites and offers WordPress consulting services in his spare time, along with eating Wheat Thins, spending time with friends and family, watching Indie films and playing with his array of Apple products.

Like it? Share it!

Comments

  1. emory April 7, 2011

    Wow, didn’t realize it was that easy. I think upcoming posts are a great way to build suspense. Thanks.
    emory recently wrote Article Spin Fail

    • Dave Clements April 7, 2011

      Thanks a lot Emory. I like this little trick a lot. I’m not sure whether I need to make it more prominent though to really grab people’s attention. I might play around with its location/style in the coming weeks.

  2. Marie September 8, 2011

    This will be great to showcase my upcoming reviews in a related category- thank you!
    Marie recently wrote Ain’t it the truth?

  3. Noumaan Yaqoob January 7, 2012

    Great idea and very useful for people with a loyal following. I will be afraid that people will steal my ideas if I published the sneak peek first. Also, what if you don’t have any posts planned for future and are trapped in writer’s block? I think I would add a quick form below the widget if -> No Future Posts Found -> Ask the users -> Please send me ideas.

    • Dave Clements January 8, 2012

      Well, that’s a legitimate concern about people stealing your ideas, but it just depends how cutting edge your content is.

      There’s already a way that you can edit the message if there are no planned posts. You could always suggest that they get in touch with you using your contact form, as a quick fix.

Add a Comment

Name - Required

Email - Required

Website - Optional

CommentLuv badge