Documentation

Print This page

Remove LoginPress Default Error Messages (Hook)

If you want to disable the WordPress default error messages from LoginPress login page and or any other plugin error messages from your login page. The following filter will help you to remove the default error messages from your login page.

Simply you need to add the following given piece of code in your Child Theme’s file functions.php and update the file.

function loginpress_display_error_messages_callback( $error ) {
$error = false;
return $error;
}
add_filter( 'loginpress_display_custom_errors', 'loginpress_display_error_messages_callback' );

Here $error contains the boolean value false for remove LoginPress default error messages.

That’s how you can remove the default error messages from your login page by WordPress or other plugins that you are using in your WordPress website. Check our complete guide on how to set custom error messages on your login page created by LoginPress.