Title: taxonomy_exists
Published: April 25, 2014
Last modified: August 20, 2026

---

# taxonomy_exists( string $taxonomy ): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#wp--skip-link--target)

Determines whether the taxonomy name exists.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#description)󠁿

Formerly [is_taxonomy()](https://developer.wordpress.org/reference/functions/is_taxonomy/),
introduced in 2.3.0.

For more information on this and similar theme functions, check out the [ Conditional Tags](https://developer.wordpress.org/themes/basics/conditional-tags/)
article in the Theme Developer Handbook.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#parameters)󠁿

 `$taxonomy`stringrequired

Name of taxonomy object.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#return)󠁿

 bool Whether the taxonomy exists.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#source)󠁿

    ```php
    function taxonomy_exists( $taxonomy ) {
    	global $wp_taxonomies;

    	return is_string( $taxonomy ) && isset( $wp_taxonomies[ $taxonomy ] );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/taxonomy.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/taxonomy.php#L376)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/taxonomy.php#L376-L380)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#related)󠁿

| Used by | Description | 
| [unregister_taxonomy()](https://developer.wordpress.org/reference/functions/unregister_taxonomy/)`wp-includes/taxonomy.php` |

Unregisters a taxonomy.

  | 
| [WP_Term::get_instance()](https://developer.wordpress.org/reference/classes/wp_term/get_instance/)`wp-includes/class-wp-term.php` |

Retrieve [WP_Term](https://developer.wordpress.org/reference/classes/wp_term/) instance.

  | 
| [WP_Customize_Nav_Menu_Item_Setting::populate_value()](https://developer.wordpress.org/reference/classes/wp_customize_nav_menu_item_setting/populate_value/)`wp-includes/customize/class-wp-customize-nav-menu-item-setting.php` |

Ensure that the value is fully populated with the necessary properties.

  | 
| [WP_Screen::get()](https://developer.wordpress.org/reference/classes/wp_screen/get/)`wp-admin/includes/class-wp-screen.php` |

Fetches a screen object.

  | 
| [WP_Terms_List_Table::__construct()](https://developer.wordpress.org/reference/classes/wp_terms_list_table/__construct/)`wp-admin/includes/class-wp-terms-list-table.php` |

Constructor.

  | 
| [_wp_ajax_menu_quick_search()](https://developer.wordpress.org/reference/functions/_wp_ajax_menu_quick_search/)`wp-admin/includes/nav-menu.php` |

Prints the appropriate response to a menu quick search.

  | 
| [wp_list_categories()](https://developer.wordpress.org/reference/functions/wp_list_categories/)`wp-includes/category-template.php` |

Displays or retrieves the HTML list of categories.

  | 
| [is_taxonomy()](https://developer.wordpress.org/reference/functions/is_taxonomy/)`wp-includes/deprecated.php` |

Checks that the taxonomy name exists.

  | 
| [WP_Widget_Tag_Cloud::_get_current_taxonomy()](https://developer.wordpress.org/reference/classes/wp_widget_tag_cloud/_get_current_taxonomy/)`wp-includes/widgets/class-wp-widget-tag-cloud.php` |

Retrieves the taxonomy for the current Tag cloud widget instance.

  | 
| [WP_Tax_Query::clean_query()](https://developer.wordpress.org/reference/classes/wp_tax_query/clean_query/)`wp-includes/class-wp-tax-query.php` |

Validates a single query.

  | 
| [wp_update_term()](https://developer.wordpress.org/reference/functions/wp_update_term/)`wp-includes/taxonomy.php` |

Updates term based on arguments provided.

  | 
| [wp_get_object_terms()](https://developer.wordpress.org/reference/functions/wp_get_object_terms/)`wp-includes/taxonomy.php` |

Retrieves the terms associated with the given object(s), in the supplied taxonomies.

  | 
| [wp_set_object_terms()](https://developer.wordpress.org/reference/functions/wp_set_object_terms/)`wp-includes/taxonomy.php` |

Creates term and taxonomy relationships.

  | 
| [wp_remove_object_terms()](https://developer.wordpress.org/reference/functions/wp_remove_object_terms/)`wp-includes/taxonomy.php` |

Removes term(s) associated with a given object.

  | 
| [wp_insert_term()](https://developer.wordpress.org/reference/functions/wp_insert_term/)`wp-includes/taxonomy.php` |

Adds a new term to the database.

  | 
| [wp_count_terms()](https://developer.wordpress.org/reference/functions/wp_count_terms/)`wp-includes/taxonomy.php` |

Counts how many terms are in taxonomy.

  | 
| [get_term_by()](https://developer.wordpress.org/reference/functions/get_term_by/)`wp-includes/taxonomy.php` |

Gets all term data from database by term field and data.

  | 
| [get_term_children()](https://developer.wordpress.org/reference/functions/get_term_children/)`wp-includes/taxonomy.php` |

Merges all term children into a single array of their IDs.

  | 
| [get_terms()](https://developer.wordpress.org/reference/functions/get_terms/)`wp-includes/taxonomy.php` |

Retrieves the terms in a given taxonomy or list of taxonomies.

  | 
| [get_taxonomy()](https://developer.wordpress.org/reference/functions/get_taxonomy/)`wp-includes/taxonomy.php` |

Retrieves the taxonomy object of $taxonomy.

  | 
| [get_objects_in_term()](https://developer.wordpress.org/reference/functions/get_objects_in_term/)`wp-includes/taxonomy.php` |

Retrieves object IDs of valid taxonomy and term.

  | 
| [is_taxonomy_hierarchical()](https://developer.wordpress.org/reference/functions/is_taxonomy_hierarchical/)`wp-includes/taxonomy.php` |

Determines whether the taxonomy object is hierarchical.

  | 
| [get_term()](https://developer.wordpress.org/reference/functions/get_term/)`wp-includes/taxonomy.php` |

Gets all term data from database by term ID.

  | 
| [get_adjacent_post()](https://developer.wordpress.org/reference/functions/get_adjacent_post/)`wp-includes/link-template.php` |

Retrieves the adjacent post.

  | 
| [get_boundary_post()](https://developer.wordpress.org/reference/functions/get_boundary_post/)`wp-includes/link-template.php` |

Retrieves the boundary post.

  | 
| [wp_get_nav_menu_items()](https://developer.wordpress.org/reference/functions/wp_get_nav_menu_items/)`wp-includes/nav-menu.php` |

Retrieves all menu items of a navigation menu.

  | 
| [wp_xmlrpc_server::wp_newTerm()](https://developer.wordpress.org/reference/classes/wp_xmlrpc_server/wp_newterm/)`wp-includes/class-wp-xmlrpc-server.php` |

Creates a new term.

  | 
| [wp_xmlrpc_server::wp_editTerm()](https://developer.wordpress.org/reference/classes/wp_xmlrpc_server/wp_editterm/)`wp-includes/class-wp-xmlrpc-server.php` |

Edits a term.

  | 
| [wp_xmlrpc_server::wp_deleteTerm()](https://developer.wordpress.org/reference/classes/wp_xmlrpc_server/wp_deleteterm/)`wp-includes/class-wp-xmlrpc-server.php` |

Deletes a term.

  | 
| [wp_xmlrpc_server::wp_getTerm()](https://developer.wordpress.org/reference/classes/wp_xmlrpc_server/wp_getterm/)`wp-includes/class-wp-xmlrpc-server.php` |

Retrieves a term.

  | 
| [wp_xmlrpc_server::wp_getTerms()](https://developer.wordpress.org/reference/classes/wp_xmlrpc_server/wp_getterms/)`wp-includes/class-wp-xmlrpc-server.php` |

Retrieves all terms for a taxonomy.

  | 
| [wp_xmlrpc_server::wp_getTaxonomy()](https://developer.wordpress.org/reference/classes/wp_xmlrpc_server/wp_gettaxonomy/)`wp-includes/class-wp-xmlrpc-server.php` |

Retrieves a taxonomy.

  |

[Show 27 more](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.0.0](https://developer.wordpress.org/reference/since/3.0.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/functions/taxonomy_exists/?output_format=md#comment-content-1205)
 2.   [Codex](https://profiles.wordpress.org/codex/)  [  11 years ago  ](https://developer.wordpress.org/reference/functions/taxonomy_exists/#comment-1205)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Ftaxonomy_exists%2F%23comment-1205)
    Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Ftaxonomy_exists%2F%23comment-1205)
 4. **Basic Example**
 5.     ```php
        $taxonomy_exist = taxonomy_exists( 'category' );
        // Returns true
    
        $taxonomy_exist = taxonomy_exists( 'post_tag' );
        // Returns true
    
        $taxonomy_exist = taxonomy_exists( 'link_category' );
        // Returns true
    
        $taxonomy_exist = taxonomy_exists( 'my_taxonomy' );
        // Returns false if global $wp_taxonomies['my_taxonomy'] is not set
        ```
    
 6.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Ftaxonomy_exists%2F%3Freplytocom%3D1205%23feedback-editor-1205)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Ftaxonomy_exists%2F)
before being able to contribute a note or feedback.