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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm just wondering how I would go about redirecting to the latest post when you go to the web site? Similar to http://gregorywood.co.uk/

Many thanks :)

Suleiman

share|improve this question
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 ); 
                exit; 
        endif;
}
share|improve this answer
    
Wow! That's it! Thank you!!! – Sulcalibur Dec 7 '10 at 17:27

Your Answer

 
discard

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.