How to do Login WordPress in Email & Username?
remove_filter('authenticate', 'wp_authenticate_username_password', 20); add_filter('authenticate', function($user, $email, $password){ if(empty($email) || empty ($password)){ $error = new WP_Error(); if(empty($email)){ //No email $error->add('empty_username', __('<strong>ERROR</strong>: Email field is empty.')); } else if(!filter_var($email, FILTER_VALIDATE_EMAIL)){ //Invalid Email $error->add('invalid_username', __('<strong>ERROR</strong>: Email is invalid.')); } if(empty($password)){ //No password ...