Support » Fixing WordPress » Change password error message: Error: The password you entered for the username

  • Hi,

    I’m building a custom login, need to change the password error message.
    I have to change the text and disable that part for Lost your password?

    Error: The password you entered for the username x is incorrect. Lost your password?

    I tried this fix using the code snippet plugin, no joy.

    Also tried adding function to the functions.php in my theme, didn’t work.

    Thanks

    • This topic was modified 10 months, 4 weeks ago by James Huff. Reason: fixed formatting
Viewing 2 replies - 1 through 2 (of 2 total)
  • lisa

    (@contentiskey)

    I added the function and filter you shared into my test site using the plugin code snippets (https://wordpress.org/plugins/code-snippets/).

    after activating the newly added code snippet I saw the message “something is wrong” when I tried to login with the wrong password and wrong username.

    code snippet I used:

    function no_wordpress_errors(){
      return 'Something is wrong!';
    }
    add_filter( 'login_errors', 'no_wordpress_errors' );

    (maybe there is some other custom code or other plugin that might be impacting your situation – maybe test with other plugins deactivated and uncustomized default theme)

    using WP version 6.2, PHP version 8.1.9, in localwp.com, theme twentytwentythree

    • This reply was modified 10 months, 3 weeks ago by lisa.
    Thread Starter EMar Sounds

    (@sounds)

    @contentiskey

    That’s odd, I have the same plugin “code snippets”
    Which works for other code snippets, but not this php function.

    Could be the theme I’m using, Blockify, I’ll test a few other ideas.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change password error message: Error: The password you entered for the username’ is closed to new replies.