WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have about 70 tags, I want to get 5 different random tags out of that 70 each time the page refreshes... this isn't working for me

<?php wp_tag_cloud( array( 'taxonomy' => 'electrician-perth', format => 'list', order => 'rand', number => '5', smallest => '10', largest => '10') ); ?>

All I get is the same 5 tags in alpha-numeric order each time I refresh my page?

Thanks heaps, Pete

share|improve this question

Valid orderby fields for wp_tag_cloud are name or count.

share|improve this answer
Maybe the lack of orderby was the issue? Also in the OP sample code, doesn't the parameters need single quotes? – brasofilo Jul 30 '12 at 17:13
I think I read the question wrong, my answer doesn't make sense. I don't know, it was early. – Milo Jul 30 '12 at 20:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.