Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I would like to able to redirect to get_bloginfo('url'); after reseting password.

But I cannot for life of me find any simple answer or function to do this.

Does anyone know if this is possible?

Thank Josh

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

Here is a simple solution. Im hooking into login_headerurl. Maybe there is a better hook for this but it works, Put this in your functions.php:

function wpse_lost_password_redirect() {

    // Check if have submitted 
    $confirm = ( isset($_GET['checkemail'] ) ? $_GET['checkemail'] : '' );

    if( $confirm ) {
        wp_redirect( home_url() ); 
add_action('login_headerurl', 'wpse_lost_password_redirect');

What it does, it runs on login_headerurl and checks for the GET parameter "checkedmail" which you get after you submitted a valid username or email. Then i redirect by using the awsome function wp_redirect to the home_url.

UPDATE after comment

If you want to redirect the user after submitted a new password you only need to use the hook password_reset here is an example:

function wpse_lost_password_redirect() {
    wp_redirect( home_url() ); 
add_action('password_reset', 'wpse_lost_password_redirect');
share|improve this answer
Hi Pontus, thank you very much for your answer, this will come use for another time i'm sure. But I'm in fact after the re-direct after the new passord itself has been reset, not after the email/user submission. See this screenshot of form that I need it the redirect to work on... i.imgur.com/x2IUQ0c.jpg - Thanks –  Joshc Jan 26 '13 at 15:39
Aaah i see, thats actually easier than the function before. See my updated answer. –  Pontus Abrahamsson Jan 26 '13 at 18:51
Awgh dude, these are both awesome!! Thanks for sharing with us, it worked at treat! Nice one. –  Joshc Jan 27 '13 at 12:32
I just used your first answer for something else, told you it would come in handy. Thank you again. –  Joshc Feb 14 '13 at 18:28
Hehe, you are welcome! –  Pontus Abrahamsson Feb 14 '13 at 18:31
add comment

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.