Opened 14 years ago
Closed 14 years ago
#15076 closed enhancement (wontfix)
wp_query->query_vars should hold taxonomy and term for post_tag and category archives
Reported by: | joostdevalk | Owned by: | scribu |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.1 |
Component: | Query | Keywords: | haspatch |
Focuses: | Cc: |
Description
wp_query->query_vars holds two variables, taxonomy and term, for custom taxonomy archives. These two variables don't exist in post_tag and category archives, and were they there, it might be easier to treat all taxonomies the same.
Attachments (1)
Change History (4)
#1
@
14 years ago
- Keywords haspatch added
Added very simple, and probably wrong patch, tested on trunk with twentyten and it doesn't seem to cause any weirdness (which is not to be expected either, it's just adding two variables nothing else).
#2
@
14 years ago
- Owner set to scribu
- Status changed from new to accepted
I think you forgot to remove the debug code from the theme header.
#3
@
14 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from accepted to closed
It is wrong, since with permalinks on, for example, 'cat' is not set.
Anyway, I think we should move away from 'taxonomy' and 'term' query vars, since now you can query multiple taxonomies.
Also, you can use $wp_query->get_queried_object()
.
Patch