Recently, one of our users asked us how to list the scheduled items of a WordPress blog. Displaying upcoming posts can be useful To give a forecast of a blog's editorial content, which can allow subscribers to see that a blog is indeed in operation, but also will generate excitement while waiting for epic topics .

In this tutorial, we are going to show you how to display the future articles of your WordPress blog.

What is a planned post in WordPress

If you've been using WordPress for a while, then you've probably noticed that posting a post in a certain period gets a lot more traffic. If you are new to WordPress (and on the use of a blog) and you don't know what time you have visitors, then you should start using Google Analytics to track that information.

The problem is you can't just sit around and wait for the right time to publish an article. That's why WordPress offers a post scheduling feature. It allows you to program articles which will be published later.

Using scheduling allows you to focus on creating content and managing your blog's editorial schedule.

Having said that, we'll see how you can display your upcoming posts on WordPress to get more subscribers.

Method 1: View Upcoming WordPress Posts

The first thing you need to do is to install and activate the plugin SOUP - Show off Upcoming Posts. For more details, see our step-by-step guide on way to install a plugin on WordPress.

After activating the plugin, you need to visit the following location “ Appearance »Widgets». You will find a widget called " Upcoming Posts In the list of available widgets. Just add the widget to your sidebar where you want to display the scheduled articles.

View planned articles on WordPress

The widget settings allow you to choose the number of articles you want to display. You can also display the dates of each article, a link to your flux RSS, or a link to a page where users can subscribe to your newsletter.

Click the Save button to save your widget settings. You can now visit your site to see the widget in action.

Method 2: How to display upcoming articles using code

In a previous article, we showed you how Create a WordPress plugin quickly". We will now use a code that you will insert into your plugin.

function bpc_upcoming_posts () {// The query to fetch future posts $ the_query = new WP_Query (array ('post_status' => 'future', 'posts_per_page' => 3, 'orderby' => 'date', 'order' = > 'ASC')); // The loop to display posts if ($ the_query-> have_posts ()) {echo ' '; while ($ the_query-> have_posts ()) {$ the_query-> the_post (); $ output. = ' '. get_the_title (). ' ('. get_the_time (' dM-Y ').') '; } echo ' '; } else {// Show this when no future posts are found $ output. = ' No posts planned yet. '; } // Reset post data wp_reset_postdata (); // Return output return $ output; } // Add shortcode add_shortcode ('upcoming_posts', 'bpc_upcoming_posts'); // Enable shortcode execution inside text widgets add_filter ('widget_text', 'do_shortcode');

Now you can navigate to the location " Appearance »Widgets». Add a text widget to one of your sidebars where you will need to add the following shortcode:

[upcoming_posts]

How to post upcoming articles on WordPress code

Click the Save button to save your widget.

You can now visit your site to see scheduled posts on your sidebar. You can also use this shortcode in an article, a page or even in a Template of a child theme.

That's it for this tutorial. Hope it helps you show your blog posts planned. Feel free to share this tutorial with your friends on your favorite social networks.