3

i recently found that a login url filter is available but i can't find a solution for the forgot password as well,

for the login url i use this:

function custom_login_url($login_url) {
    return ''.get_option('siteurl'). '/login';
}
add_filter('login_url','custom_login_url');

is it possible to do the same for the forgot password?

thanks a lot, Philip

1 Answer 1

8

Yes it's also possible for the password, by running a filter on lostpassword_url, which is basically the password equivalent of the login url..

Example

Basically the same as before, just changed the function and hook names.

add_filter( 'lostpassword_url', 'custom_lostpass_url' );

function custom_lostpass_url( $lostpassword_url ) {
    return get_option('siteurl'). '/lostpass';
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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