Skip to content

Instantly share code, notes, and snippets.

@kaseybon
Created June 13, 2014 22:00
Show Gist options
  • Save kaseybon/e226bbe4e2130c657fce to your computer and use it in GitHub Desktop.
Save kaseybon/e226bbe4e2130c657fce to your computer and use it in GitHub Desktop.
Add to WordPress index.php to redirect the blog page to the first blog post.
<?php
require('./wp-blog-header.php');
if (have_posts()) : the_post();
header("location: ".get_permalink());
exit;
endif;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment