not sure if its related, are you using the ‘Simple Tags’ plugin?
Its gone haywire for me on 3.1, and ruined most of my category related queries
No, not using ‘Simple Tags’. Hasn’t really gone haywire just yet, but nonetheless I’m regretting clicking the “Automatically Update” button.
I have this problem too. I didn’t expect things to break — but I also regret not upgrading the test version of my website first before upgrading production.
Anyway, a solution to this problem would help a lot. Thanks!
I have the same issue. lot’s of posts showing up on main page that shouldn’t be there.
@greenflag: Yeah been messing around trying to get it to work but nothing so far. Do tell me if you find something, would really help.
nothing on my end. i searched for answers and this is so new there is no info on it yet…
i do have other edits (like limit # of posts on main page) that are working just fine. it only seems to be this one…
@greenflag: Yeah all of that works, in fact the “Functions.php” was not overwritten in the update (I had it write protected before hand). It’s just the “exclude_category” function that doesn’t work right.
Did you notice the change in the URL format (For Categories) as well?
i didn’t notice categories change, no. i use a plugin that removes /category/ from the url.
Too bad, meaning for now there’s no way to fix this yeah?
Well, guess I could survive for a couple of days.
Try using category__not_in instead of cat.
function exclude_category($query) {
if ( $query->is_home ) {
$query->set('category__not_in', '147');
}
return $query;
}
add_filter('pre_get_posts', 'exclude_category');
@otto; Thanks, that actually works. So why exactly does this work?
Because of a bug in the “cat” parameter that is not in the “category__not_in” parameter.
But does this work for various categories or just one?