Coolest Guides on the Planet

coolest guides on the planet

Coolest Guides On The Planet

  • Home
  • macOS
  • WebDev
  • All Posts
  • Contact

Remove the WordPress Reset Lost Password Link on Login Page

October 26, 2013 Leave a Comment

To remove the reset ‘Lost Your Password‘ link and function on the WordPress login page you need to add a function to your themes functions.php file and add in some CSS.

The reason why both are needed as the forgot ‘Lost Your Password‘ link appears in 2 areas as a link in the bottom of the dialog box and also as an error dialog box.

wordpress-lost-password-page-link
The first link is at the bottom of wp-login.php, add in the function below to your themes functions.php file to remove it.

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

 

This will remove the link, but an error dialog is displayed if the incorrect values are used in the username/password fields.

wordpress-lost-password-page-link-error

 

You can hide this by adding in some CSS in wp-admin.css add in the code below to /public_html/wp_admin/css/wp-admin.css:

#login_error {display: none;}

Thats it – that link should now be hidden from view.

Cats: Tech, WordPress

Tags

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls

Donate a Beer to the Coolest Guides

Get Beaver Builder Now!

Copyright © 2023· Neil Gee - All Rights Reserved - Hosted by Runcloud

Copyright © 2023 · gee on Genesis Framework · WordPress · Log in