Title: Random Post
Last modified: August 20, 2016

---

# Random Post

 *  Resolved [philtyler](https://wordpress.org/support/users/philtyler/)
 * (@philtyler)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/random-post-4/)
 * Hi everyone!
 * There is a lot of info on this, but after 4 hours I cannot find one resource 
   that explains this for dummies like myself.
 * I have a very simple site. I’m not sure if I’m allowed to link to it, so a mod
   can remove it if they need to – [http://phlebotomyjobboard.com/](http://phlebotomyjobboard.com/)
 * The main page has 10 posts. Only 1 category. I would like the visitor to get 
   these posts in random order. There will not be more than these 10 posts.
 * I’ve read the wp page about making random posts, but I go crossed eyed when looking
   at it. Could anyone help? Please be specific, thank you!

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/random-post-4/#post-3317384)
 * in index.php, after this line:
 *     ```
       <!-- Start the Loop -->
       ```
   
 * add this code:
 *     ```
       <?php if ( is_home() ) {
       global $query_string;
       query_posts( $query_string . '&orderby=rand' ); } ?>
       ```
   
 * [http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters](http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters)
   
   [http://codex.wordpress.org/Function_Reference/query_posts#Preserving_Existing_Query_Parameters](http://codex.wordpress.org/Function_Reference/query_posts#Preserving_Existing_Query_Parameters)
 *  Thread Starter [philtyler](https://wordpress.org/support/users/philtyler/)
 * (@philtyler)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/random-post-4/#post-3317391)
 * It works!!!
 * Thank you so much!
 * Just so other dummies know, the index file is in the theme folder that you are
   using. WP-content/themes/’your theme here’/index

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

The topic ‘Random Post’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [philtyler](https://wordpress.org/support/users/philtyler/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/random-post-4/#post-3317391)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
