Opened 13 years ago
Closed 12 years ago
#20590 closed defect (bug) (fixed)
is_tax() with term parameter returns true for any taxonomy with that term
Reported by: | petercarlill | Owned by: | |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | minor | Version: | |
Component: | Taxonomy | Keywords: | has-patch needs-unit-tests |
Focuses: | Cc: |
Description
I have two custom taxonomies, 'body' and 'operations', assigned to different custom post types.
Both taxonomies contain the term 'shoulder'
is_tax('operations','shoulder') returns true both when viewing the 'shoulder' archive for the taxonomy 'operations' and when viewing the archive page for the term 'shoulder' in the taxonomy 'Body-Parts'
Therefore, is_tax() is returning true for the term, and ignoring which taxonomy it is in.
The only way I can get it to return true only when viewing the 'shoulder' archive for 'operations' is by is_tax( 'operations', 'shoulder') && is_tax('operations')
Version is 3.3.2
Attachments (1)
Change History (8)
Note: See
TracTickets for help on using
tickets.
Yep -
WP_Query::is_tax()
only does the tax check if you didn't pass a term - I have a fix - patch attached