Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/is term

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.


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.


<?php is_term$term$taxonomy ?>


(integer|string) (required) The term to check
Default: None
(string) (optional) The taxonomy name to use
Default: ''

Return Values

Get the term id or Term Object, if exists.



  • Uses global: (object) $wpdb
  • Uses global: (object) $term

Change Log

Source File

is_term() is located in wp-includes/taxonomy.php.


See also index of Function Reference and index of Template Tags.