future posts

One of the requirements on bullko.com is to display future dated entries. Say you’re planning an event that’s spread over 2 weeks and you want people to see what events are on which day, even in the future, so people can plan. That’s how.

As more and more people use the likes of MT and WP as cms this is becoming important. MT does it, I tried on quiet thoughts with no problem. WP initially didn’t, until I searched for it in the support forums.

First, show the entry in the main body.

In wp-blog-header.php find:

if ($pagenow != ‘post.php’ && $pagenow != ‘edit.php’) { if ((empty($poststart)) || (empty($postend)) || !($postend > $poststart)) { $where .= ‘ AND post_date <= \”.$now.’\”; } Add // before the $where: if ($pagenow != ‘post.php’ && $pagenow != ‘edit.php’) { if ((empty($poststart)) || (empty($postend)) || !($postend > $poststart)) { //$where .= ‘ AND post_date <= \”.$now.’\”; }

Then, make sure it shows in the calendar. In templates-function-general.php in the wp-includes folder, find:

AND post_date < ‘” . current_time(‘mysql’) . ‘\”, ARRAY_N);

change to:

AND post_date <> ‘” . current_time(‘mysql’) . ‘\”, ARRAY_N);

A bit further down, find:

.”AND post_date < ‘”.current_time(‘mysql’).”‘ “

change to:

.”AND post_date <> ‘”.current_time(‘mysql’).”‘ “