• 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
  • WordPress, React, and The Future

    WordPress, React, and The Future

    Reading time: 1 minute

    On September 14, Matt Mullenweg announced that WordPress was rethinking its use of the React.js library due to Facebook’s clarification on its patents. The short story: Facebook released React under a modified “open-source-ish” license (called BSD+Patents) that allow them to judiciously revoke the patent if a service violates the terms of service (specifically, if they…

    WordPress
  • The Toolbox: 4 WordPress Plugins I Can’t Live Without

    The Toolbox: 4 WordPress Plugins I Can’t Live Without

    Reading time: 2 minutes

    Whenever I speak at conferences, attend meetups, or even just causally mention WordPress in conversation, there’s one question that comes up in nearly every conversation I have: What WordPress plugins do you recommend? That list is constantly in flux – a new plugin will be developed that replaces an old one, or an old one…

    WordPress