如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款
get_term_parents_list( int $term_id, string $taxonomy, string|array $args = array() )
Retrieve term parents with separator.
参数
- $term_id
(int)
(Required)
Term ID.
- $taxonomy
(string)
(Required)
Taxonomy name.
- $args
(string|array)
(Optional)
Array of optional arguments.
- 'format'
(string) Use term names or slugs for display. Accepts 'name' or 'slug'. Default 'name'. - 'separator'
(string) Separator for between the terms. Default '/'. - 'link'
(bool) Whether to format as a link. Default true. - 'inclusive'
(bool) Include the term to get the parents for. Default true.
Default value: array()
返回
(string|WP_Error) A list of term parents>WP_Error or empty string on failure.