Family Encyclopedia >> Electronics

How to list future scheduled posts in WordPress

Recently one of our users asked us how they can list scheduled or future posts in WordPress. Displaying upcoming posts can be helpful in getting people to subscribe to your blog. In this article, we will show you how to display upcoming future posts in WordPress sidebar.

How to list future scheduled posts in WordPress

What are upcoming scheduled or future posts in WordPress?

If you've been blogging for a while, then you've probably noticed that posting at a certain time gets more people to read it. If you're new to blogging and don't know what time you get the most visitors, you should start using Google Analytics to track this information.

The problem is that you can't just sit back and wait for the publish button to come along. That is why WordPress comes with a built-in scheduling feature. It allows you to schedule your posts to be published later.

With scheduling, you can focus on creating content and managing your editorial calendar like a pro.

With that said, let's see how you can display your upcoming posts in WordPress and use them to get more subscribers.

To make it easier for you, we've created a video tutorial on how to list upcoming scheduled posts which you can see below.

Subscribe to WPBeginner

However, if you just want to follow the text instructions, you can follow our step-by-step tutorial on how to list upcoming scheduled posts in WordPress.

Method 1:Show scheduled or future posts with the plugin

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

Upon activation, you need to visit Appearance »Widgets page. There you will find the 'Upcoming Posts' widget in the list of available widgets. Just add the widget to the sidebar where you can see the scheduled posts.

How to list future scheduled posts in WordPress

The widget settings allow you to choose the number of scheduled posts you want to display. You can also display dates next to them, a link to your RSS feed, or a link to a page where users can sign up for your email list.

Click the Save button to store your widget settings.

You can now visit your website to see the widget in action.

How to list future scheduled posts in WordPress

Method 2:Show scheduled or upcoming posts manually

Simply add this code to your theme's functions.php file or a site-specific plugin.

 función wpb_upcoming_posts () // La consulta para buscar publicaciones futuras $ the_query = new WP_Query (array ('post_status' => 'future', 'posts_per_page' => 3, 'orderby' => 'date', 'order' = > 'ASC')); // El bucle para mostrar publicaciones si ($ the_query-> have_posts ()) echo '
    '; while ($ the_query-> have_posts ()) $ the_query-> the_post (); $ salida. = '
  • '. obtener_el_título (). ' ('. get_the_time (' d-M-Y ').')
  • '; eco '
'; else // Mostrar esto cuando no se encuentren publicaciones futuras $ output. = '

Aún no hay publicaciones planeadas.

'; // Restablecer datos de publicación wp_reset_postdata (); // Retorno de salida retorno $ salida; // Añadir el código corto add_shortcode ('upcoming_posts', 'wpb_upcoming_posts'); // Habilitar la ejecución de shortcode dentro de los widgets de texto add_filter ('widget_text', 'do_shortcode');

Now you can visit Appearance »Widgets page. Add a text widget to the sidebar where you want to display upcoming posts and add this shortcode inside the widget.

[next_posts]

How to list future scheduled posts in WordPress

Click the Save button to store your widget settings.

You can now visit your website to see upcoming scheduled posts in your sidebar. You can also use this shortcode in a post, page or template in your child theme.

We hope this article helped you learn how to display scheduled posts in the WordPress sidebar. You may also want to see our list of the 25 most useful WordPress widgets for your site.

If you enjoyed this article, please subscribe to our WordPress YouTube Channel video tutorials. You can also find us on Twitter and Facebook.