Redirect home page to a random blog post

This is a slight mod of the wordpress post from yesterday (Redirect home page to first blog post) and think you might enjoy it. Add this snippet to the index.php template of your wordpress theme before get_header(). Your home page will automatically redirect to a random post from your wordpress database.



if (have_posts() && is_home()) {
while (have_posts()) {

Leave a comment