Wordpress 2.0 and future posts issues
I’m having trouble with a website I’m currently developing using WordPress as a lightweight CMS. Or rather it’s three websites. But nevermind. The thing is that I’d like to have an “events” section up there, and, especially with the assistance of the excellent Event Calendar plugin, it’s been easy as pie. Up until now.
I read that the Event Calendar wasn’t fully WP2.0 compatible, but there was a simple fix proposed in the wiki; just change “nickname” to “nicename” and off we go. Unfortunately there was more to it than that.
WP has a plugin hook called “posts_where”, and that is the key to allowing display of future posts… If the category is “blah” then then change the criteria that post_date_gmt should be less than or equal to “now”.
It appears that everything is alright, event posts are showing up correctly and are readable —but only as long as I’m logged in as a user. Otherwise $wp_query changes, and there are a lot more criterias added (AND year=”2006” AND month=”3” etc etc). So the simple preg_replace routine needs to get a whole lot more complicated in order for things to work. And I just feel that this is simply not the way things are supposed to work.
It might just be that I’m using a weird permalink structure ( /category/year/month/article-title/ ), and the permalink function in WP needs those extra request in the $wp_query… need to do some proper testing before drawing any conclusions. I’ll update this post with the progress during the next few days…
UPDATE: Seems that the beforementioned plugin, EventCalendar, has an been updated to version 3.04, providing better results in WP2.0. In order to get it working one must first add a patch to classes.php, see this post for reference. Have yet to try it out, but looks promising!
2 comments so far. Go ahead, write something
You can follow any responses to this entry through the RSS feed
hi, you know I’m having the exact same problem in a website I’m developing… did you ever find out how to sort this problem?
#1 jaime 30 Mar 06
My solution this time was to give up messing with WordPress, and using textpattern instead. I haven’t given up though…
#2 bjorn 01 Apr 06
Type here: