wp_count_terms
wp_count_terms ( $taxonomy, $args = array() )
Parameters:- (string) $taxonomy Taxonomy name.
- (array|string) $args Optional. Array of arguments that get passed to get_terms(). Default empty array.
Returns:- (array|int|WP_Error) Number of terms in that taxonomy or WP_Error if the taxonomy does not exist.
Defined at: - Introduced in WordPress: 2.3.0
- Deprecated in WordPress: —
Description
Count how many terms are in Taxonomy.
Default $args is 'hide_empty' which can be 'hide_empty=true' or array('hide_empty' => true).