Core Function
View Source on Trac ↗ get_category_parents()
get_category_parents(
mixed $category_id,
mixed $link = false,
mixed $separator = '/',
mixed $nicename = false,
mixed $deprecated = array()
) Retrieves category parents with separator.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $category_id int | Category ID. Required |
| $link bool | Optional. Whether to format with link. Default false. |
| $separator string | Optional. How to separate categories. Default '/'. |
| $nicename bool | Optional. Whether to use nice name for display. Default false. |
| $deprecated array | Not used. |
Return Value
((string)
| WP_Error) A list of category parents on success, WP_Error on failure.
Function Information
Since Version
1.2.0
Source File
wp-includes/category-template.php
Advertisement