Function: get_taxonomy

get_taxonomy( string $taxonomy )

Retrieves the taxonomy object of $taxonomy.

Shortcut: gt

You can use above key combination to trigger the associated snippet for this function in the WordPress Snippets for Visual Studio Code extension. You can also use this shortcut to search for this function on this website.

The get_taxonomy function will first check that the parameter string given is a taxonomy object and if it is, it will return it.


Name Type(s) Default Value Description
$taxonomy string

Name of taxonomy object to return.


WP_Taxonomy | false

The Taxonomy Object or false if $taxonomy doesn't exist.

WordPress Developer Newsletter

Stay informed of new chapter releases, important WordPress API updates and more.