Top

Daily Tip: How to Hide WordPress Login Error Messages

October 29, 2010

Hiding WordPress login error messages can be helpful if you don’t want to reveal to users that they’ve used the wrong username or the wrong password. The message that says “Invalid username” could potentially help a hacker in his search for the right username and password.

You can easily hide these messages by adding the following snippet to your theme’s functions.php file. This tip comes to you courtesy of Filip Stefansson who posted it over at wp-snippets.com:

add_filter('login_errors', create_function('$a', "return null;"));

This will help your site be a little more secure in the face of a direct hacking attempt.

Tweet This Post

Comments

Got something to say?

Bottom
Article Archive  |  This site is a historical archive of pressography.com, a WordPress plugin and theme blog that published between 2006 and 2012. It is preserved for reference and is not operated by, affiliated with, or endorsed by its original authors. Nothing here is for sale and no form on this site is active. If you are the original owner and would like this domain returned, please get in touch.