Let’s see how to hide the errors at login WordPress. If you enter an incorrect username or password on the WordPress authorization page, the system will display a notification about it. This is great for a user as he will know exactly what is wrong. But not for the site owner. Such messages are dangerous because hackers can use their data to gain illegal access to the site. So it makes sense to measure them with some common phrases. For example, “What is wrong! Try again!”

How to hide login errors

File functions.php

This method is suitable if you do not want to put on your site additional plug-ins. To do this, you need to add a few lines to the active theme function file.

add_filter( 'login_errors', function () {
    return 'What is wrong! Try again!';
});