Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

get_term_children()

3 tags 1 category

get_term_children() — Merges all term children into a single array of their IDs. This recursive function will merge all of the children of $term into the same array of term IDs. Only useful for taxonomies which are hierarchical. Will return an empty array if $term does not exist in $taxonomy.

Inputs: $term_id (int): ID of term to get children. $taxonomy (string): Taxonomy name.

Returns array|WP_Error: List of term IDs. WP_Error returned if $taxonomy does not exist.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…