Title: Posts in Random Order
Last modified: August 19, 2016

---

# Posts in Random Order

 *  [Janet Morrow](https://wordpress.org/support/users/mountash/)
 * (@mountash)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/posts-in-random-order/)
 * I have created category templates, and would like one of them to display the 
   posts in random order. Is this possible to do? What would the code by?
 * This is what I am currently using:
 *     ```
       <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
       <h2 class="storytitle" id="post-<?php the_ID(); ?>"><?php the_title(); ?></h2>
       	<div class="storycontent">
       		<?php the_content(); ?>
       	</div>
       ```
   

The topic ‘Posts in Random Order’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [Janet Morrow](https://wordpress.org/support/users/mountash/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/posts-in-random-order/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
