WordPress.org

Forums

[resolved] wp_tag_cloud - re-randomize the cloud (3 posts)

  1. g01010
    Member
    Posted 5 years ago #

    I've searched for this but couldn't find an answer. I think it's probably simple, just not simple enough for me.

    I've inserted a tag cloud on my front page using something like this:

    <?php wp_tag_cloud( number=10&order=RAND ); ?>

    So this generates a cloud of 10 randomly selected tags. So far, so good.

    I'd like to add a button on the page so that users can reload the cloud (without reloading the page, ideally) so that they are presented with a new set of tags. Can anyone point me to a bit of code to accomplish this?

    Many thanks.

  2. Mark / t31os
    Moderator
    Posted 5 years ago #

    If you're wanting to update the cloud without a page reload then what are you looking for is ajax...
    http://codex.wordpress.org/AJAX

  3. g01010
    Member
    Posted 5 years ago #

    Ah Ajax...

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic