«

»

Jul 22 2008

$query_post syntax

On the off chance you stumble into this post while searching for an obscure [WordPress] bug, look no further. After 5 minutes of [WordPress template tag codex] searching on the properties of the $query_posts tag, you can fix an issue with the “Next & Previous” page links failing to advance the main page by replacing this:

< ?php query_posts('cat=-8'); ?>

with this:

< ?php query_posts($query_string.'$cat=-8'); ?>

Footnote: After reading through my original post, I realized how absolutely retarded it was. Not sure why I even blogged about it. So I cut out all the crap and just posted the code fix. I’m pretty sure nobody cares but I needed something to post and this is about exciting as things get when I start goofing with PHP.

Update 08/06/08:
This ‘bug’ is has become more difficult to fix than I originally thought. I’m still trying to figure out how to get a filter applied to my main page without breaking the nav links.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>