Function: wp_get_term_taxonomy_parent_id

wp_get_term_taxonomy_parent_id( integer $term_id, string $taxonomy )

Returns the term's parent's term_ID.

Shortcut: wgttpi

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.


Name Type(s) Default Value Description
$term_id integer

Term ID.

$taxonomy string

Taxonomy name.


integer | false

False on error.

WordPress Developer Newsletter

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