How to list future upcoming scheduled posts in WordPress?

Nemanja

Premium Member
Joined
Nov 23, 2012
Messages
304
Points
28
I have a series of posts that going to publish into my Wordpress blog but I don't want to publish all of them once, is it possible to them in a schedule?
 

Marc van Leeuwen

Premium Member
Joined
May 29, 2016
Messages
1,132
Points
63
You want more people to subscribe to your blog site. One way to get more users interested and interested in your blog is to show them in advance what posts you have planned to post. For example, you can write the first part of a tutorial and show them that after a week there will be a second.

First, schedule a post in the future. You do not need to complete the article right away to have the title and put a week after the post, as long as you remember the note is okay. Then open your sidebar.php or wherever you want to display the list of posts in the future and paste the following code:

Code:
<?php query_posts('showposts=10&post_status=future'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<span class="datetime"><?php the_time('j. F Y'); ?></span></p>
<?php endwhile;
else: ?><p>No future events scheduled.</p>
<?php endif; ?>
The above code is sorted according to the post_status parameter which in this case is "future," but it can be drafted, published. There is also an argument in this article that limits the number of posts to be displayed; showposts = 10. You can change the number of posts in the schedule that you want to post.

Hope it helped!
 
Latest threads
Replies
1
Views
24
Replies
0
Views
354
Replies
4
Views
1,729
Replies
2
Views
737
Recommended threads

Latest postsNew threads

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top