#19939 closed defect (bug) (duplicate)
is_post_type_archive doesn't work with Tax Query
| Reported by: | wonderboymusic | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Posts, Post Types | Version: | 3.3.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.