WordPress.org

Support

Support » Plugins and Hacks » Find out how many tags are in a group

Find out how many tags are in a group

  • scalare

    @scalare

    I need to display a tags cloud for a tags group (as list, not cloud) that has to be split in two parts. The first part will have 5 tags, and then I have to display a “see all” link that when clicked, displays the rest of the tags in that group. So far, everything works fine. The problem is that if there are 5 or less tags in the group, I shouldn’t display the “see all” link at all, since it won’t display anything.

    Is there a function in your plugin that would let me find out how many tags are in a group, so I know if I have to display the “see all” link in case that number is bigger than 5?

    Thank you in advance.

    http://wordpress.org/plugins/xili-tidy-tags/

Viewing 2 replies - 1 through 2 (of 2 total)
  • scalare

    @scalare

    Anyone?

    scalare

    @scalare

    I’ve figured out. Since the template tag uses the same parameters as wp_tag_cloud(), I called it using format=array&echo=false, and assigned it to an array. Then I just asked for the array length to figure out if it was bigger than 5.

    I hope this helps somebody.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Find out how many tags are in a group’ is closed to new replies.