[wp-trac] [WordPress Trac] #16622: [17246] Breaks category exclusion
WordPress Trac
wp-trac at lists.automattic.com
Thu Feb 24 01:54:14 UTC 2011
#16622: [17246] Breaks category exclusion
------------------------------------+--------------------
Reporter: markjaquith | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 3.1.1
Component: Query | Version: 3.1
Severity: critical | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+--------------------
Comment (by Otto42):
Workaround that should work for those who need it:
{{{
function exclude_category($query) {
if ( $query->is_feed ) {
$query->set('category__not_in', array(5,6));
}
return $query;
}
add_filter('pre_get_posts', 'exclude_category');
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16622#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list