Random blog post

Wpsnipp – How to Make a Random Post – A tutorial for creating a button to take visitors to a random post on your blogAdding this PHP code to your wordpress theme just before the loop will display one random post from your wordpress database.

 

 

<?
query_posts('showposts=1&orderby=rand');
?>

 

 

Leave a comment