Remove the “Lost your password?” Link from the Login Page

Lose the lost password.

Use this simple patch in your theme’s functions.php file to remove the “Lost your password?” link from your login page. Note: this will only remove the default “Lost your password?” link. There is another one that will appear as error output which would need to be removed separately.

function remove_lostpassword_text ( $text ) {
    if ($text == 'Lost your password?'){$text = '';}
        return $text;
    }
add_filter( 'gettext', 'remove_lostpassword_text' );

There you have it. Keep in mind, this is one of many simply solutions to a very complex problem. Many WordPress sites see ‘bots’ visiting their login page dozens or even hundreds of times per day. I would recommend Wordfence for adding additional rules to deal with these brute force attacks.

11
Mar
2017

Leave a Reply

Your email address will not be published.
*