0

I have created a custom login and registration page with the plugin 'User Registration' and they both work perfectly fine, however, on the login page if I click on the ‘Forgot password’ link, it takes me to the default WordPress password reset page. Is there any way to redirect to a custom page that I have created for this purpose?

Thank you in advance.

Kind regards, Nora

1

Yep, there's a hook to change the lost password URL.

I found it by going to this nice page to search all the hooks and filters and selecting 'Hooks' and trying 'lost password' https://developer.wordpress.org/reference/

An example from here: https://codex.wordpress.org/Plugin_API/Filter_Reference/lostpassword_url

    add_filter( 'lostpassword_url', 'my_lost_password_page', 10, 2 );

    function my_lost_password_page( $lostpassword_url, $redirect ) {
        return home_url( "/yournew/lostpasswordpage.php" );
    }
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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