#19939 closed defect (bug) (duplicate)
is_post_type_archive doesn't work with Tax Query
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.3.1 |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
same problem as here: #18614
queried_object clobbers the post_type query portion. $this->is_post_type_archive returns true and post_type is attainable from public query vars.
This breaks all over eMusic. as does the other ticket, have to check is_post_type_archive() && 'whatever' === get_query_var( 'post_type' ) vs is_post_type_archive( 'whatever' )
Attachments (2)
Change History (7)
#3
@
13 years ago
Actually, is-pta-patch.diff doesn't look fine, since in_array() returns a boolean, whereas array_intersect() returns an array.
Note: See
TracTickets for help on using
tickets.
Regarding even-better-patch.diff, it's debatable: why shouldn't the category be the queried object?
In general, the idea of having a single "queried object" breaks down when you query by more than one criteria.
is-pta-patch.diff looks fine.