Forums

[resolved] Display a fixed number of random tags (4 posts)

  1. berlinde
    Member
    Posted 2 years ago #

    Hello

    Say I want to display 5 random tags of the total tags I want, in no particular order. I've found that wp_tag_cloud() allows me to do this but with only the top tags. I want to, whenever i refresh the page, have another 5 random tags displayed. I've looked around and found no plug-ins to accomplish this. Can anyone tell me if this is possible, and if so, how would I go about doing it?

    Thank you

  2. Mark / t31os
    Moderator
    Posted 2 years ago #

    Use the order parameter...
    wp_tag_cloud('order=rand')

    If that's not quite what you want you'll have to find a way to query the tables manually and re-order the selected tags..

  3. berlinde
    Member
    Posted 2 years ago #

    t31os_:

    while in fact order=rand will randomize the order of the tags, it will only do so with the five top tags. thank you for your help :)

  4. berlinde
    Member
    Posted 2 years ago #

    I finally worked it out. After looking through what seemed like a million tag plugins, I found out that this one allows me to do just that, display *any* five random tags and not just randomize the top five ones like wp_tag_cloud() would allow.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.