Core Function
View Source on Trac ↗ get_term_children()
get_term_children( mixed $term_id, mixed $taxonomy ) Merges all term children into a single array of their IDs.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $term_id int | ID of term to get children. Required |
| $taxonomy string | Taxonomy name. Required |
Return Value
((array)
| WP_Error) List of term IDs. WP_Error returned if `$taxonomy` does not exist.
Function Information
Since Version
2.3.0
Source File
wp-includes/taxonomy.php
Advertisement