[wp-trac] [WordPress Trac] #17592: 'exclude_from_search' excludes from non-search queries

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 14 20:56:48 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     |
--------------------------+-----------------------------

Comment (by aaroncampbell):

 Replying to [comment:7 ryan]:
 > Introduced in r13052 and as far as I recall was done on purpose.
 Regardless, I don't think we can change the meaning of 'any' at this
 point. We probably need a way to ask for all public types and all types.

 I think it's really common to have a post type you DON'T want in searches
 but you DO want taxonomy pages for.  Maybe in query.php where we check `if
 ($this->is_tax)` and set `$post_type = 'any';` we could instead set it to
 whatever post types the taxonomies support?  Or possibly set it to 'all'
 and add another condition that uses `get_post_types()` instead of
 `get_post_types( array('exclude_from_search' => false) );`

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17592#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list