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

Function Reference/is taxonomy

← Return to function reference.

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 function is deprecated as of Version 3.0. Please use Function_Reference/taxonomy_exists instead.

This Conditional Tag checks if the taxonomy name exists by passing a taxonomy name as an argument to it. This is a boolean function uses a global $wp_taxonomies variable for checking if taxonomy name existence, meaning it returns either TRUE if the taxonomy name exist or FALSE if it doesn't exist.


<?php is_taxonomy($taxonomy); ?>


(string) (required) The name of the taxonomy
Default: None

Return Values

True on success, false on failure.


$taxonomy_exist = is_taxonomy('category');
//returns true

$taxonomy_exist = is_taxonomy('post_tag');
//returns true

$taxonomy_exist = is_taxonomy('link_category');
//returns true

$taxonomy_exist = is_taxonomy('my_taxonomy');
//returns false if global $wp_taxonomies['my_taxonomy'] is not set


Change Log

Since: 2.3.0

Source File

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


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