WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Counting Taxonomy Terms (3 posts)

  1. Huw Tyler
    Member
    Posted 3 years ago #

    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?

  2. Huw Tyler
    Member
    Posted 3 years ago #

    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' )); ?>

  3. Ian
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic