Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#12786 closed defect (bug) (duplicate)

If a taxonomy is added to query, post type is ignored

Reported by: silkjaer's profile Silkjaer Owned by: ryan's profile ryan
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Query Keywords: post_type, taxonomy
Focuses: Cc:

Description

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'; 

Change History (1)

#1 @nacin
15 years ago

  • Milestone Unassigned deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.