Title: Query random posts not working
Last modified: August 19, 2016

---

# Query random posts not working

 *  Resolved [da457nilo](https://wordpress.org/support/users/da457nilo/)
 * (@da457nilo)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/query-random-posts-not-working/)
 * The code I’m using to query my post is below but for some reason the orderby=
   rand is not working. I’ve read several different posts on this saying it conflicted
   with something that had to do with if i used “WP Sticky” which i currently don’t
 * `query_posts("posts_per_page=1&category_name=news&orderby=rand");`
 * If someone can provide a solution to get this working that would be great! Thanks.

Viewing 1 replies (of 1 total)

 *  Thread Starter [da457nilo](https://wordpress.org/support/users/da457nilo/)
 * (@da457nilo)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/query-random-posts-not-working/#post-1961426)
 * actually got this fixed. It was conflicting with another plugin called “Post 
   Types Order”

Viewing 1 replies (of 1 total)

The topic ‘Query random posts not working’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [da457nilo](https://wordpress.org/support/users/da457nilo/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/query-random-posts-not-working/#post-1961426)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
