My functions.php file contains a query modifier for the homepage to exclude categories that I don't want appearing there. With the 3.1 upgrade this is somehow broken now. Can anyone tell me why? Here's what my code looks like in functions.php
<?php
function myFilter($query) {
if ($query->is_home) {
$query->set('cat','-1,-11,-12,-4,-23,-24');
}
return $query;
}
add_filter('pre_get_posts','myFilter');
?>
Some category excluder plugins such as Ultimate Category Excluder may be broken as well. That one is actually a bug: Trac Ticket
The Hotfix plugin now has a fix that might help: http://wordpress.org/extend/plugins/hotfix/
Thanks lpstenu. In the Trac Ticket link I found a solution, posted below for anyone with similar issues.
<?php
function exclude_category($query) {
if ( $query->is_home ) {
$query->set('category__not_in', array(1,11,12,4,23,24));
}
return $query;
}
add_filter('pre_get_posts', 'exclude_category');
?>