WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp count terms

Description

Count how many terms are in Taxonomy.

Default $args is 'hide_empty' which can be 'hide_empty=true' or array('hide_empty' => true).

Usage

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

Parameters

$taxonomy
(string) (required) Taxonomy name.
Default: string
$args
(mixed) (optional) Overwrite defaults. See get_terms().
Default: array/string

Return Values

(int) 
How many terms are in $taxonomy

Change Log

Since: 2.3

Source File

wp_count_terms() is located in wp-includes/taxonomy.php

Related

Count Tags: wp_count_posts(), wp_count_terms(), wp_count_comments(), count_users()

See also index of Function Reference and index of Template Tags.