首页 WordPress函数大全 get_category_parents()

get_category_parents()

2020-05-01 / 3610阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

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

Retrieve category parents with separator.

描述

参数

$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()

返回

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

大家谈论
    我的见解