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

Retrieve category parents with separator.


16 related functions found for: get_category_parents

Top ↑

Related terms found for this post

TaxonomyTerms
wp-parser-related-wordsadjac, adjacent, categori, categories, category, category-template-php, get, parent, parents, taxonomi, taxonomy, wp-includes
wp-parser-packageTemplate, WordPress
wp-parser-source-filewp-includes/category-template.php

Top ↑

Terms Used Terms Used

Terms used in the related posts query

  • adjac
  • adjacent
  • categori
  • categories
  • category
  • category-template-php
  • get
  • parent
  • parents
  • taxonomi
  • taxonomy
  • Template
  • wp-includes
  • wp-includes/category-template.php
  • template

Top ↑

Description Description


Top ↑

Parameters Parameters

$id

(int) (Required) Category ID.

$link

(bool) (Optional) Whether to format with link.

Default value: false

$separator

(string) (Optional) How to separate categories.

Default value: '/'

$nicename

(bool) (Optional) Whether to use nice name for display.

Default value: false

$deprecated

(array) (Optional) Not used.

Default value: array()


Top ↑

Return Return

(string|WP_Error) A list of category parents on success, WP_Error on failure.


Top ↑

Source Source

File: wp-includes/category-template.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
4.8.0 The $visited parameter was deprecated and renamed to $deprecated.
1.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.