[wp-trac] [WordPress Trac] #16622: [17246] Breaks category exclusion
WordPress Trac
wp-trac at lists.automattic.com
Wed Feb 23 20:12:02 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 | Keywords:
--------------------------+-------------------
[17246] broke category exclusion using this code (change the excluded cats
to match something in your install).
{{{
function exclude_category($query) {
if ( $query->is_feed ) {
$query->set('cat', '-5,-6');
}
return $query;
}
add_filter('pre_get_posts', 'exclude_category');
}}}
Reported by Mike Davidson [http://wordpress.org/support/topic/wp-31
-breaks-rss-customization-via-exclude_category?replies=1 here].
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16622>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list