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’).”‘ “

Nifty.

gym time

In honour of me (finally) joining the gym I’m creating new category.

So, i joined the gym downstairs from the office and went there during lunchtime with my colleagues. There was a circuit training class they were attending so I went too. Oh boy, I’m dreadfully unfit, man.

Did the bikes instead.

I signed up for a year, actually 14 months, cos I get 2 months free. I want to make this work.

And, I’m having salad today.