Opened 15 years ago
Closed 15 years ago
#13044 closed defect (bug) (invalid)
is_taxonomy should return true on taxonomy pages
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Taxonomy | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
contrary is_category() and other conditional functions, the is_taxonomy function must have argument $taxonomy, so cannot be used to check if i am on the taxonomy page.
wp-includes/taxnomoy.php should have something like
function is_taxonomy( $taxonomy= NULL ) { global $wp_query; if (NULL == $taxonomy) return isset($wp_query->is_tax); global $wp_taxonomies; return isset($wp_taxonomies[$taxonomy]); }
Change History (2)
Note: See
TracTickets for help on using
tickets.
We already have is_taxonomy().
For something to work in the loop, you may be thinking of is_tax() (which does *not* return true for post_tag and category due to compat reasons -- #11904).