[wp-trac] [WordPress Trac] #12786: If a taxonomy is added to query, post type is ignored

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 31 21:47:32 UTC 2010


#12786: If a taxonomy is added to query, post type is ignored
--------------------------+-------------------------------------------------
 Reporter:  Silkjaer      |       Owner:  ryan               
     Type:  defect (bug)  |      Status:  new                
 Priority:  normal        |   Milestone:  Unassigned         
Component:  Query         |     Version:  3.0                
 Severity:  normal        |    Keywords:  post_type, taxonomy
--------------------------+-------------------------------------------------
 If a custom taxonomy is added to a query, the post_type is ignored.

 E.g. if my custom taxonomy "genre" is shared between "artist" and
 "releases" and i query post_type=artist&genre=rock, the result will be
 both artists and releases.

 By removing the following line from query.php on line 2043 the problem
 goes away:

 {{{
 $post_type = 'any';
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12786>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list