Title: Problem showing random post
Last modified: August 19, 2016

---

# Problem showing random post

 *  [zonakaoz](https://wordpress.org/support/users/zonakaoz/)
 * (@zonakaoz)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/problem-showing-random-post/)
 * Hi people, on my localhost i have wp 2.5 & 2.3 and i use this code to show a 
   list of 10 random post:
 * <?php
 *  $rand_posts = get_posts(‘numberposts=10&orderby=RAND()’);
 *  foreach( $rand_posts as $post ) :
 *  ?>
    - 
    -  <?php endforeach; ?>
    - But.. with wp 2.6 the list only show a list of the latest 10 post..
    - What changed in wp 2.6 ? i want to know, how i modify the code?
    - Sorry my english..

Viewing 1 replies (of 1 total)

 *  Thread Starter [zonakaoz](https://wordpress.org/support/users/zonakaoz/)
 * (@zonakaoz)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/problem-showing-random-post/#post-854303)
 * the system deletes me some code, only ul tag and href.. but the important is 
   there,,
 *  $rand_posts = get_posts(‘numberposts=10&orderby=RAND()’);

Viewing 1 replies (of 1 total)

The topic ‘Problem showing random post’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [zonakaoz](https://wordpress.org/support/users/zonakaoz/)
 * Last activity: [17 years, 9 months ago](https://wordpress.org/support/topic/problem-showing-random-post/#post-854303)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
