Show future posts in Wordpress 2.3+
To enable Wordpress to show and publish future posts…BEFORE creating future posts (or if you have already created posts - reedit the timestamp in Admin > Manage > Posts). In the file /wp-includes/post.php look for the section:
if ( 'publish' == $post_status ) {
  $now = gmdate('Y-m-d H:i:59');
  if ( mysql2date('U', $post_date_gmt) > mysql2date('U', $now) )
 $post_status = 'future';
 }
change this to:
if ( 'publish' == $post_status ) {
  $now = gmdate('Y-m-d H:i:59');
  if ( mysql2date('U', $post_date_gmt) > mysql2date('U', $now) )
 //hack to show future posts
 $post_status = 'publish';
 }
That worked for me on Wordpress 2.3.3
Tags: future, future posts, word press, Wordpress
March 14th, 2008 at 10:33 pm
It works, but generally you should not modify core WP files or you’ll run into trouble when it’s time to upgrade.
Here’s a 1-line solution which you can put in your theme in index.php and archive.php. Add it at the top:
query_posts($query_string.’&post_status=publish,future’);
March 30th, 2008 at 6:59 am
Skippy’s solution will display the post on the index and archive pages, but it will not allow the post to be viewed directly from the single.php template. That is the problem I’m running into.
April 5th, 2008 at 8:43 pm
[...] Re: using wordpress as a calendar for the future If you haven’t already come across this: Arkytek Ltd :: Blog
April 10th, 2008 at 12:59 pm
Hi!
Is this a solution to actually show future posts in Wordpress? I want to be able to show future posts and use Wordpress as an event/calender publishing system, found a plugin called “eventcalendar” but it doesn’t seem to work in WP2.5.
Skippy: Im not that good in php, could you explain exactly where in the code to place your solution?
June 2nd, 2008 at 9:05 am
thanks skippy, your solution was just what I needed. And I don’t need to view future posts in full in my layout, just a mention.
Excellent, thank you very much!
August 21st, 2008 at 2:33 am
Excellent work .. thanks for this. cheers
August 25th, 2008 at 6:34 am
this does not work for me