By nickel

Here’s a bit of WordPress hackery for you… In case you haven’t noticed, WordPress 2.1 has changed the way posts and Pages are defined in the database. What this means to you that a variety of plugins for generating archives, lists of related posts, etc. started including Pages along with posts following the upgrade. Not devastating, but kind of annoying. So here’s the fix… Look at the plugin code for instances of:

post_status=’publish’

and change it to:

post_status = ‘publish’ AND post_type = ‘post’

I’ve tried this on two different plugins (Smart Archives and WASABI Related Entries) and it worked in both cases. Only later did I realize that Justin Blanton had already released a newer version of Smart Archives that fixed the problem. Oh well, at least I learned something.


No Responses to “Fixing the Pages/Posts Problem in WordPress 2.1”  

  1. No Comments

Leave a Reply

You must log in to post a comment.


Categories