Using the code given here you can display five posts in random order on your WordPress Site.
About the format you can adjust as you like, the number of posts is set by numberposts=5

<?php $rand_posts = get_posts('numberposts=5&orderby=rand');
foreach( $rand_posts as $post ) :
setup_postdata($post); ?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php the_excerpt() ?>
<?php endforeach; ?>

1 comment Write a comment

  1. Great website. Lots of useful info here. I am sending it to a few pals ans also sharing in delicious. And of course, thanks in your effort!

Leave a Reply


This site uses Akismet to reduce spam. Learn how your comment data is processed.