View Single Post
Old 11-17-2010, 12:32 AM  
Angry Jew Cat - Banned for Life
(felis madjewicus)
 
Industry Role:
Join Date: Jul 2006
Location: In Mom & Dad's Basement
Posts: 20,368
Quote:
Originally Posted by harvey View Post
not sure what do you mean by shuffle, I take you mean random. If so, open your index.php, look for the loop and add something like this:

Code:
 
  
 <?php
 $rand_posts = get_posts('numberposts=10&orderby=rand');
 foreach( $rand_posts as $post ) :
 ?>
    <div class="post">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_content(); ?>
</div>
 <?php endforeach; ?>
That's all i do, edit it right into the loop. Works good for throwing up random past articles in an external loop too.
Angry Jew Cat - Banned for Life is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote