How to count the current posts terms WordPress

wp_count_terms┬áthe function counts terms in a given taxonomy (e.g. total number of categories, total number of tags). To get what you want, get the terms for the post and just count them count( wp_get_post_terms( $post_id, $taxonomy, $args ) );. Or, assuming that in real life you might need those terms later: count() function help you to …

Read more

WP_Query count posts – custom Post Type

The wp_count_posts function has parameter $type for post type to count, you should use this parameter if you want to count the number of schusslersalz A snippet Full snippet as follow: I hope this code helped