• 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 3.3’s roadmap has been set… at least, it will be.

    WordPress 3.3’s roadmap has been set… at least, it will be.

    Reading time: 3 minutes

    Here’s the email I received of some of the proposed changes to WordPress – a lot of them look super exciting (goodbye IE7!) and plenty of them are just amazing.  What’s your favorite? User Feature: Media Uploader (azaozz) · Definitely v1: Integrate Plupload into dashboard. (GSoC project) · Probably v2: Improve our image manipulation and…

    WordPress
  • The Hidden WordPress Options Panel

    The Hidden WordPress Options Panel

    Reading time: 1 minute

    Did you know that there’s a hidden options panel in WordPress? It’s one page you can visit that will allow you to set every single option available to you on your site – even some of the hidden ones that are set via plugins and/or other functions.

    WordPress