Title: Cannot Set Random Order in query_posts
Last modified: August 21, 2016

---

# Cannot Set Random Order in query_posts

 *  Resolved anonymized-3854925
 * (@anonymized-3854925)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/cannot-set-random-order-in-query_posts/)
 * I’ve done this countless times in the past but can’t seem to get it to work on
   the site I’m building at the minute
 * `<?php query_posts('post_type=slider&orderby=rand&posts_per_page=1'); ?>`
 * It simply just loads the same post every time (there are 3 in total)
 * Can anyone see what I’m doing wrong? I do have Post Types Order plugin installed
   but I’ve disabled ‘auto sort’ and am still having the same problem

Viewing 1 replies (of 1 total)

 *  Thread Starter anonymized-3854925
 * (@anonymized-3854925)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/cannot-set-random-order-in-query_posts/#post-4982246)
 * Ignore this, I think it just loaded the same image many times in a row just by
   chance

Viewing 1 replies (of 1 total)

The topic ‘Cannot Set Random Order in query_posts’ is closed to new replies.

## Tags

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

 * 1 reply
 * 1 participant
 * Last reply from: anonymized-3854925
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/cannot-set-random-order-in-query_posts/#post-4982246)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
