[wp-trac] [WordPress Trac] #18513: Searching with explicit post types unsets page post type

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 24 22:51:54 UTC 2011


#18513: Searching with explicit post types unsets page post type
--------------------------+------------------------------
 Reporter:  GaryJ         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  3.2.1
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by GaryJ):

 Well, I'll be. I looked at that post type registration and missed the
 publicly_querable line. Thank you.

 In that case then, why does the Page appear in the search results when
 there's no post_type set? The Debug Admin Bar gives part of the Query SQL
 as:
 {{{
 ...AND wpgt_posts.post_type IN ('post', 'page', 'attachment', 'class',
 'function', 'hook', 'book')...
 }}}
 It's this discrepancy which is odd.

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


More information about the wp-trac mailing list