query_posts excluding categories doesnt seem to be working in 2.7
-
I am having a problem with query posts in 2.7.1 for a front page template.
Previously I used the following line which used to work fine:
query_posts('showposts=4&cat=-113');However this now seems to incorrectly show items in category 113. The only way I have managed to get it to work is using the following query:
query_posts(array( 'showposts' => 4, 'category__not_in' => array(113), ));This has worked in the past before 2.7 without changes to the code so is there a bug in 2.7 which breaks this or was I doing something unexpected?
Interestingly, changing the initial query_posts to show only categories from 113 (remove minus sign) works fine.
The topic ‘query_posts excluding categories doesnt seem to be working in 2.7’ is closed to new replies.