Forums

redirect problem (2 posts)

  1. jrbriggs
    Member
    Posted 3 years ago #

    Does anyone have any ideas why redirecting might not be working in WordPress 2.0.2?

    I've tried both explicitly setting header('Location', 'http://www.yahoo.com') for example, and using the wp_redirect function, but neither seem to do anything. I don't get any errors, but it doesn't work either.

    My function is called from the init event by the way. There was no problem doing this using the 1.x versions of WP.

  2. jrbriggs
    Member
    Posted 3 years ago #

    Erk. Never mind. I think I've figured it out. I needed to call "exit" directly after the redirect. For some reason it's not a problem in WP1.5 but it is in 2.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.