Are you looking for a way to hide login error messages? For security reasons, you might want to hide the login messages that WordPress shows when someone is trying to login with the wrong information. The message “Invalid username” assists hackers in finding the right username and password, so with this snippet you can disable that message.
All you have to do is add this code to your theme’s functions.php file or in a site-specific plugin:
add_filter('login_errors', create_function('$a', "return null;"));
Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly copy / paste code snippets in WordPress, so you don’t accidentally break your site.