WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Counting Taxonomy Terms

[Resolved] Counting Taxonomy Terms

  • I am trying to find a way of counting the number of terms registered within a taxonomy. Not a post count within each term but a number of terms (tags) within a custom taxonomy.

    Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Found it myself, it turns out it’s quite a nice straightforward workaround.
    Nice little function if anyone wants it…

    <?php print @count(get_terms( 'TAXONOMY-NAME' )); ?>

    Ian

    @ianaleksander

    Thanks, that was just what I was searching for. It worked in 3.1 for me. With tags also, just using “post_tag” as the category name.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Counting Taxonomy Terms’ is closed to new replies.