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

Show off Your Upcoming Posts to Spark Interest

| 6 Comments

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?

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.

Categories: Code & Snippets | Permalink

What next?

Hire me

If you couldn't quite manage this yourself, find it too intimidating, or just don't have the time to do it, you can always hire Dave to do it. Please get in touch so that we can discuss your needs.

Leave a comment

If you have a question, update, or comment about the tutorial, please leave a comment. I try and respond to every comment, though it may take a few days, so please check back soon.

Keep your site backed up, updated & secure

I provide a service called The WP Butler, which helps you stay on top of the maintenance of your WordPress site. Instead of worrying about whether your site is secure, updated and backed up, The WP Butler handles all that for you on a regular basis, so that you can focus on doing what you do best. If you use coupon DIWW, you'll save 15% on our already-low-prices for all maintenance plans.

Author: Dave Clements

Dave Clements has been building websites for close to a decade and in 2010, he formalised that by starting his own company, The UK Edge. He now works on a variety of web projects, from simple tasks like installing a new WordPress site, to consulting on problems, or redesigning his clients' sites. He also runs Do It With WordPress, a site dedicated to providing free tutorials on WordPress. When he's not building your new website, you can find Dave eating Wheat Thins, spending time with friends and family, watching Indie films, fostering kittens from the local Humane Society, listening to some dubstep, dance and electronic rock, and exploring the world.

6 Comments

  1. Wow, didn’t realize it was that easy. I think upcoming posts are a great way to build suspense. Thanks.

    • 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. This will be great to showcase my upcoming reviews in a related category- thank you!

  3. 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.

    • 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.

Leave a Reply