Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm just wondering how I would go about redirecting to the latest post when you go to the web site? Similar to

Many thanks :)


share|improve this question

1 Answer 1

up vote 2 down vote accepted

Try this (as plugin or theme's functions.php):

add_action( 'template_redirect', 'redirect' );
function redirect() {
        if ( is_home() && ! is_paged() ) : 
                wp_redirect( get_permalink() , 301 ); 
share|improve this answer
Wow! That's it! Thank you!!! – Sulcalibur Dec 7 '10 at 17:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.