Here is a method to send a basic “failed” notification back to your custom login page:
// On failure, notify the custom form through a redirect with a new query variable
add_action( 'wp_login_failed', 'custom_login_failed'), 10, 2 );
// When a user leaves a field blank, return that as an error that will fire wp_login_failed
add_filter( 'authenticate', 'custom_authenticate_username_password'), 30, 3);
function custom_login_failed( $username )
{
$referrer = wp_get_referer();
if ( $referrer && ! strstr($referrer, 'wp-login') && ! strstr($referrer,'wp-admin') )
{
wp_redirect( add_query_arg('login', 'failed', $referrer) );
exit;
}
}
function custom_authenticate_username_password( $user, $username, $password )
{
if ( is_a($user, 'WP_User') ) { return $user; }
if ( empty($username) || empty($password) )
{
$error = new WP_Error();
$user = new WP_Error('authentication_failed', __('<strong>ERROR</strong>: Invalid username or incorrect password.'));
return $error;
}
}
More here, along with full code that includes redirecting your wp-login.php in all scenarios:
https://wordpress.stackexchange.com/a/105224/11966