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:

Description

Count how many terms are in Taxonomy.

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

Related Functions

count_users, wp_insert_term, wp_count_posts, wp_set_post_terms, wp_get_post_terms

Top Google Results

User discussions

wpseek mobile