[wp-trac] [WordPress Trac] #17592: 'exclude_from_search' excludes from non-search queries
WordPress Trac
wp-trac at lists.automattic.com
Thu Mar 15 01:12:44 UTC 2012
#17592: 'exclude_from_search' excludes from non-search queries
--------------------------+-----------------------------
Reporter: danblaker | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Query | Version: 3.1.2
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+-----------------------------
Changes (by aaroncampbell):
* cc: aaroncampbell (added)
Comment:
By the way, the workaround I used was to show 'news' posts on the
'news_item_cat' taxonomy pages. I did it like this:
{{{
function pd_only_query_tickers( $q ) {
if ( is_tax( 'news_item_cat' ) )
$q->set( 'post_type', 'news' );
}
add_filter( 'pre_get_posts', 'pd_only_query_tickers' );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17592#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list