WordPress.org

Ready to get started?Download WordPress

Forums

xili-tidy-tags
Find out how many tags are in a group (3 posts)

  1. scalare
    Member
    Posted 10 months ago #

    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/

  2. scalare
    Member
    Posted 10 months ago #

    Anyone?

  3. scalare
    Member
    Posted 10 months ago #

    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.

Reply

You must log in to post.

About this Plugin

About this Topic