is_taxonomy_hierarchical()WP 2.3.0

Whether the taxonomy object is hierarchical.

Checks to make sure that the taxonomy is an object first. Then Gets the object, and finally returns the hierarchical value in the object.

A false return value might also mean that the taxonomy does not exist.

For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.

1 time — 0.000011 sec (very fast) | 50000 times — 0.02 sec (speed of light) | PHP 7.0.8, WP 4.6.1

No Hooks.


true|false. Whether the taxonomy is hierarchical.


is_taxonomy_hierarchical( $taxonomy );
$taxonomy(string) (required)
Name of taxonomy object.


Since 2.3.0 Introduced.

Code of is_taxonomy_hierarchical() WP 6.0

function is_taxonomy_hierarchical( $taxonomy ) {
	if ( ! taxonomy_exists( $taxonomy ) ) {
		return false;

	$taxonomy = get_taxonomy( $taxonomy );
	return $taxonomy->hierarchical;