get_category_parents


get_category_parents ( $id, $link = false, $separator = '/', $nicename = false, $deprecated = array() )

Parameters:
  • (int) $id Category ID.
  • (bool) $link Optional, default is false. Whether to format with link.
  • (string) $separator Optional, default is '/'. How to separate categories.
  • (bool) $nicename Optional, default is false. Whether to use nice name for display.
  • (array) $deprecated Not used.
Returns:
  • (string|WP_Error) A list of category parents on success, WP_Error on failure.
Defined at:
Change Log:
  • 4: .

Description

Retrieve category parents with separator.

Related Functions

get_category_by_path, get_category_children, get_categories, get_category_link, get_category

Top Google Results

User discussions

wpseek mobile