If you want to make is it so that a user doesn’t know why a failed login failed, you can use these 2 lines of code. Useful if you’re the only user and you don’t want to give potential hackers any extra info. For example, if you have the right username but a bad password, by default it will tell you in the error message – letting the person know they have half the info correct. If a username doesn’t exist, that information is also revealed.
add_filter( 'login_errors', '__return_false' ); add_filter( 'login_messages', '__return_false' );
You might want to add a little CSS to make sure the empty error/message boxes don’t show up either:
add_action( 'login_head', 'login_head_css' ); function login_head_css() { ?><style type="text/css">.message, #login_error { display:none; }</style><?php }