wp_count_terms


wp_count_terms ( $args = array(), $deprecated = '' )

Parameters:
  • (array|string) args Optional. Array of arguments that get passed to get_terms(). Default empty array.
  • (array|string) deprecated Optional. Argument array, when using the legacy function parameter format. If present, this parameter will be interpreted as `$args`, and the first function parameter will be parsed as a taxonomy or array of taxonomies. Default empty.
Returns:
  • (string|WP_Error) Numeric string containing the number of terms in that taxonomy or WP_Error if the taxonomy does not exist.
Defined at:
Change Log:
  • 5: .

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

wp_count_sites, count_users, wp_insert_term, wp_count_posts, wp_get_post_terms

Top Google Results

User discussions

wpseek mobile