[wp-trac] [WordPress Trac] #13020: WP_Query - Post type ignored in taxonomy queries.

WordPress Trac wp-trac at lists.automattic.com
Sat Apr 17 09:06:47 UTC 2010


#13020: WP_Query - Post type ignored in taxonomy queries.
--------------------------+-------------------------------------------------
 Reporter:  d910qf        |       Owner:                              
     Type:  defect (bug)  |      Status:  new                         
 Priority:  normal        |   Milestone:  3.0                         
Component:  Post Types    |     Version:  3.0                         
 Severity:  normal        |    Keywords:  has-patch, taxonomies, query
--------------------------+-------------------------------------------------
Changes (by dd32):

  * milestone:  Unassigned => 3.0


Comment:

 Made a slight addition to the commit, The below SQL was added for all
 taxonomy queries, It'll not be included if a query is directly for a
 specific post_type (thats not an attachment).

 {{{LEFT JOIN wp_posts AS p2 ON (wp_posts.post_parent = p2.ID) ....
 ((wp_posts.post_status = 'publish') OR (wp_posts.post_status = 'inherit'
 AND (p2.post_status = 'publish'))) }}}

 I've left this open for a question: the post_status will ALWAYS be
 overridden there still, I'm thinking that should be respected as well, If
 i request drafts in a taxonomy, i'd expect to recieve drafts.. This might
 be more important for those using custom post status's.

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


More information about the wp-trac mailing list