0

Does anyone know a way to edit the wordpress errors that appear on the registration screen and lost passwords screen:

Lost password screen error ERROR: Enter a username or email address.

Registration screen error: ERROR: Please type your email address.

Thanks :-)

1
  • read the wp-login.php file. If you can change anything you'll see the filters in there (ie. apply_filters())
    – Joel M
    Commented Jan 2, 2020 at 3:22

1 Answer 1

0

you can change the message in login screen by using login_errors filter hook, just paste this code in the themes functions.php file :

add_filter('login_errors','login_error_message');

function login_error_message($error){
     //check if that's the error you are looking for
     $pos = strpos($error, 'incorrect');
     if (is_int($pos)) {
         //its the right error so you can overwrite it
         $error = "Wrong information";
     }
     return $error;
}

for registration screen error refer this codex page https://codex.wordpress.org/Plugin_API/Filter_Reference/registration_errors

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.