Core Function
View Source on Trac ↗ is_tax()
is_tax( mixed $taxonomy = '', mixed $term = '' ) Determines whether the query is for an existing custom taxonomy archive page.
Parameters 2 required
| Name / Type | Description |
|---|---|
| mixed | (string | string[]) $taxonomy Optional. Taxonomy slug or slugs to check against. Default empty. Required |
| mixed | (int | string | int[] | string[]) $term Optional. Term ID, name, slug, or array of such to check against. Default empty. Required |
Return Value
(bool)
bool Whether the query is for an existing custom taxonomy archive page.
True for custom taxonomy archive pages, false for built-in taxonomies
(category and tag archives).
Function Information
Since Version
2.5.0
Source File
wp-includes/query.php
Advertisement