Title: Order: Option for Random
Last modified: August 20, 2016

---

# Order: Option for Random

 *  [Cornflower Design](https://wordpress.org/support/users/scarecrow-rye/)
 * (@scarecrow-rye)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/order-option-for-random/)
 * Within built-in WordPress functions, such as _get\_posts()_ and _get\_users()_,
   it would be very useful to have an additional value for the _order_ parameter
   to allow results to be returned in a random order. For example:
 * `<?php get_users('role=author&number=3&order=RAND); ?>`

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/order-option-for-random/#post-2301943)
 * there is some instruction in the codex for `get_posts()`
    [http://codex.wordpress.org/Template_Tags/get_posts#Random_posts](http://codex.wordpress.org/Template_Tags/get_posts#Random_posts)
 * not sure with `get_users()` – for instance, have you tried to use ‘orderby=rand’?
 * (if it is not directly mentioned in the codex, does not mean it would not work)
 *  Thread Starter [Cornflower Design](https://wordpress.org/support/users/scarecrow-rye/)
 * (@scarecrow-rye)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/order-option-for-random/#post-2301956)
 * Thanks. I hadn’t spotted that the _rand_ value was available for the orderby 
   parameter within _get\_posts()_.
 * Looking through _wp-includes/user.php_ it’s deffinetely not an option for _get\
   _users()_.
 *  Thread Starter [Cornflower Design](https://wordpress.org/support/users/scarecrow-rye/)
 * (@scarecrow-rye)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/order-option-for-random/#post-2302005)
 * _rand_ doesn’t appear to be a valid value within _get\_pages()_ either. It would
   be helpful if the standard set of properties were consistant throughout these
   functions.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Order: Option for Random’ is closed to new replies.

## Tags

 * [get_posts](https://wordpress.org/support/topic-tag/get_posts/)
 * [get_users](https://wordpress.org/support/topic-tag/get_users/)
 * [order](https://wordpress.org/support/topic-tag/order/)

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 3 replies
 * 2 participants
 * Last reply from: [Cornflower Design](https://wordpress.org/support/users/scarecrow-rye/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/order-option-for-random/#post-2302005)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
