Title: Random include solution
Last modified: August 19, 2016

---

# Random include solution

 *  Resolved [sylvianNYC](https://wordpress.org/support/users/sylviannyc/)
 * (@sylviannyc)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/random-include-solution/)
 * I just wanted to share what I’ve been using for a random php inclusion.
 *     ```
       <?php
         $article = glob(TEMPLATEPATH . '/folder/*.php');
         shuffle($article);
         include ($article[0]);
       ?>
       ```
   

The topic ‘Random include solution’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [sylvianNYC](https://wordpress.org/support/users/sylviannyc/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/random-include-solution/)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
