• 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
  • How to Add Rainbow Text To WordPress

    How to Add Rainbow Text To WordPress

    Reading time: 1 minute

    I’ve been tinkering with the theme on this website, and I’m been very happy with how things have come out. I have a soft spot for gradients, especially with the ‘punk’ color scheme I’ve been using on my branding. One question I get, consistently: “How can I achieve the rainbow gradient text effect”? It’s actually…

    Design, Tutorial, WordPress
  • Custom Branded Google Search With WordPress

    Custom Branded Google Search With WordPress

    Reading time: 5 minutes

    I’ve been playing around with some really cool features in WordPress lately.  With my site, and a few others i’ve been working on, I’ve been toying with the “Page Template” feature that allows me to customize which elements show up on a page (like, a sidebar, specific headers, a footer, etc).  But, while working specifically…

    Tutorial, WordPress