首页 WordPress函数大全 get_categories()

get_categories()

2020-05-01 / 5070阅 / 悠然

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

get_categories( string|array $args = '' )

Retrieve list of category objects.

描述

If you set the ‘taxonomy’ argument to ‘link_category’, the link categories will be returned instead.

See also See also

  • get_terms(): Type of arguments that can be changed.

Top ↑

参数

$args

(string|array)
(Optional)
Arguments to retrieve categories. See get_terms() for additional options.

  • 'taxonomy'
    (string) Taxonomy to retrieve terms for. Default 'category'.

Default value: ''

返回

(array) List of category objects.

大家谈论
    我的见解