This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions. All code that uses this function should be converted to use its replacement if one exists. See also wp-includes/deprecated.php.
Use
any of these functions instead.
This page redirects to an external site: https://developer.wordpress.org/reference/functions/is_term/
Languages:
English •
日本語
(Add your language)
Description
Check if Term exists.
Returns the index of a defined term, or 0 (false) if the term doesn't exist.
Replace With
term_exists for check that term exists or is_tax with optional $term argument for check that you are in term archive.
Usage
<?php is_term( $term, $taxonomy ) ?>
Parameters
- $term
- (integer|string) (required) The term to check
- Default: None
- $taxonomy
- (string) (optional) The taxonomy name to use
- Default: ''
Return Values
- (mixed)
- Get the term id or Term Object, if exists.
Examples
Notes
- Uses global: (object) $wpdb
- Uses global: (object) $term
Change Log
Source File
is_term() is located in wp-includes/taxonomy.php.
Related