Function: get_category_children

get_category_children( integer $id, string $before, string $after, array $visited )

Retrieve category children list separated before and after the term IDs.

Shortcut: gcc

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.

Parameters

Name Type(s) Default Value Description
$id integer

Category ID to retrieve children.

$before string '/'

Optional. Prepend before category term ID.

$after string ''

Optional, default is empty string. Append after category term ID.

$visited array array()

Optional. Category Term IDs that have already been added.

Returns

string

WordPress Developer Newsletter

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