• Home
  • About Mitch
  • Speaking
  • Articles
  • Contact
  • Home
  • About Mitch
  • Speaking
  • Articles
  • Contact

Digital Strategist

WordPress Developer

Content Creator

Unapologetic Punk

Mitch Canter

  • X
  • Bluesky
  • GitHub
  • Twitch
  • YouTube
  • LinkedIn
Tutorial

Displaying Future Posts in WordPress

CMDR Mitchcraft

Reading time: 1 minute

If you do like I do and schedule posts ahead of time (especially on the podcast), there’s a way inside of WordPress to show your readers what posts are coming up next:

<?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(); ?>
        <?php the_date(); ?> - <?php the_title(); ?>
    <?php endwhile;
}
?>

This will display up to 5 “scheduled” posts wherever you drop in the code.  Add a headline <h2> tag if you want to give it a title (should you want to use it as a widget).

Want to see this code in action?  Check the WordPulse podcast page‘s sidebar to see it working!

Tips and Tricks, WordPress
  • Hangin’ with the ITIVE Crew

    Hangin’ with the ITIVE Crew

    Reading time: 1 minute

    You can see it in action on the Social Media Clubhouse website – the various events have various images, logos, and link categories showing up depending on where you are on the site. You can download the plugin from the official WordPress repository, or install it through your local blog! EDIT: Screencast below 🙂

    WordPress
  • WordPress: The Ultimate Content Management System (CMS)

    WordPress: The Ultimate Content Management System (CMS)

    Reading time: 2 minutes

    For years WordPress has been touted as the number one blogging platform.  And without mistake – it is.  But as we creep closer to WordPress 3.1 it’s nice to take a step back and see just how far its’ come.  From winning the CMS Hall of Fame Award to the multiple thousands of plugins that…

    WordPress