WordPress.org

Ready to get started?Download WordPress

Forums

Oy Vey! Glitch form 2.5 to2.6 (1 post)

  1. Anonymous
    Unregistered
    Posted 5 years ago #

    I just upgraded to 2.6 and my random article generator just stopped working. It now shows my most recent post instead. Can anyone tell me how to fix it? The current code is below:

    <?php
    			 $rand_posts = get_posts('numberposts=1&orderby=RAND()');
    			 foreach ($rand_posts as $post) :
    				setup_postdata($post);
    			 ?>

    Thanks for any help you can give!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.