wp count terms 统计分类法中的分类项目数量

描述

统计分类法中有多少个分类项目。

默认 $args 为 ‘hide_empty’ ,可以为’hide_empty=true’ 或 array(‘hide_empty’ => true).

Usage

<?php wp_count_terms( $taxonomy, $args ); ?>

参数

$taxonomy
(string) (必需) 分类法名称
默认: string
$args
(mixed) (可选) 覆盖默认参数,查阅 get_terms().
默认: array/string

返回值

(int)
$taxonomy 的分类项目总数。

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *