Cannot exclude category from query_posts()
-
A recent upgrade of WordPress has stopped some code from working on my index.php template. The code is used to hide all category 56 posts from appearing in my template’s loop:
global $query_string; query_posts($query_string.'&cat=-56');
However after a recent upgrade, it shows the posts from category 56. If I remove the $query_string from the query_post argument, it works, category 56 posts aren’t shown. So there’s some problem with what $query_string contains.
If I echo out $query_string it returns ‘pagename=blog’.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Cannot exclude category from query_posts()’ is closed to new replies.