Redirect user after password reset - WordPress

Published on Sep 17, 2016 & tagged in WordPress

In WordPress, after user submit the form to reset the password, new password will saved on database & a message will show on the page about the status.

In one of my recent project, I have to redirect my user to home page after password reset. If you like to do so, use below code snippet.

function wpse_lost_password_redirect() {
   wp_redirect( home_url() );
   exit;
}
add_action('password_reset', 'wpse_lost_password_redirect');

Do you need any help on WordPress?

I'm happy to help you. Just fill the form on contact page & I will get back to you within few hours.

Recent Posts

  1. The add_image_size() function - WordPress best practices
  2. Remove page title using filter - WordPress
  3. Comment out code in Liquid Template Language
  4. Remove Plugin Stylesheets and Scripts - WordPress
  5. Get blog page URL - WordPress