WordPress can sometimes be over helpful such as telling you either your username or password was incorrect at login.
Essentially WordPress is saying “Dear Mr Hacker, you have guessed the correct username but the password still needs some work. Please try again. Love & kisses – WP“.
Hmmmmm….. We need to sort that out straight away.
Add the following code to your functions.php file.
add_filter(‘login_errors’,create_function(‘$goaway’, “return null;”));WordPress filters allow you to change a function’s output.
Here we are filtering the function “login_errors” which is used to display that oh-so-helpful information on the login screen and replacing it with our own custom function.
Our function accepts one input called $goaway which we don’t use but it needed as a function parameter.
It then simply returns a null value which is the same as saying, do nothing.
Essentially we’re interrupting the info on it’s way to the login screen and making it display nothing.
Happy days!