Add this filter to change how blank username/password is treated:
add_filter( 'authenticate', 'custom_authenticate_username_password', 30, 3);
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;
}
}
And then your original redirect on wp_login_failed will work with blank username/password as well.
Related Posts:
- Restricting frontend acess based on user role otherwise redirect to login form
- Redirect wp-login
- Problem in auto login after registration
- Login form- no feedback
- How can I redirect user after entering wrong password?
- Custom login form
- Prevent wp_login_form() from redirecting to wp-admin when there are errors
- How do I change the language of only the login page?
- Disable WordPress 3.6 idle logout / login modal window / session expiration
- Avoid to load default WP styles in login screen
- How to fake a WordPress login?
- Can not login with correct username and password
- How do I use add_action from a class method?
- How can I add a custom script to footer of login page?
- How to keep always logged in development environment
- I want to disable E-Mail verifcation / activation when a user signs up for my WordPress site
- custom login page redirect to logged in user profile page
- How to customise wp-login.php only for users who are setting a password for the first time?
- WordPress Login Footer URL
- Remove built in wordpress login and use only google auth
- wp_login action hook not working
- Change Login Page for a Multisite Subsite
- Redirect user after login/registration globally
- Positioning the “Lost your password?” and “← Back to Site”
- send users logging in from wp-login.php directly to home page of site, rather than dashboard
- How to get login data (session) outside WordPress?
- Add class to input form in login form
- Allow access to a page for admins only
- Customizing login error messages
- Customizing the WordPress login form
- how to restrict user login whenever if a user puts on hold by editing wp-login action?
- How do I force “users must be registered and logged in” on subsites?
- wp_get_referer not working properly after wp_redirect
- deny IPs from wp-login using .htaccess
- Login redirects and query strings
- Passing username to login screen
- Login error redirecting to wp-login page
- How can I prevent my custom form from redirecting to wp-login?
- reset password link redirect to login page
- How do I replace “Username” in the WordPress login form?
- Custom Login iframe doesn’t work
- Password reset – Disabled for LDAP accounts
- How to Get Logged-in to “Remote WP Site” from my local script (in Same Browser)?
- Correct method of redirecting user login
- Replace dash with space in username on login
- Autologin only working the second time
- replace wp-login.php login forms via a hook & use custom forms with wp-login form validation
- How to modify the action attribute of the wp-login.php?action=register form?
- How can I login as admin after redirect to custom login page
- Auto login between word press subdomain and a .net website
- Disabling standard registration login with username/email and password?
- How to change wordpress Log In text
- WordPress error on log out ‘Not Permitted’ and can’t log out
- Is wp_login_form secure on a non secure page?
- Is the login encrypted before it is sent? If so how to do I encrypt it the same way?
- Form Action submit over https
- Do more action after login successfully
- Is there anyway to get the inputted password string from the login form?
- Login and Forgot password in Lightbox
- Forcing frontend login with UI switch
- Prevent display password on wp-login.php
- add_action(‘init’) not work
- Change default login auth
- wordpress login without password just email address (NO 2 factor authentication with email)
- WordPress SSL not working [closed]
- Where is the php file, that does the checks for login information?
- Hide Author page from others
- Reloading page with a query string upon login for admins
- Custom login modal page action
- Cannot Get User id after login success in file wp_login.php
- Require re-login when logged-in user attempts to access restricted page
- This webpage has a redirect loop issue
- Alert Message through email or phone(Message)
- Moving from one host to another – cannot access the dashboard
- Temporally disable password to login with empty password?
- How are all users now set to inactive?
- woocommerce store login not working at first time
- How do I change the language of the login page to Arabic?
- WordPress site login Redirect
- How do you implement a login feature on a WordPress site?
- How to add custom authentication to wordpress login and register
- Login form does not store/remember/suggest users password
- Custom user roles are unable to login
- Using is_user_logged_in() to lock down whole site
- Check for $ _POST fields in a POST method form
- Styling WordPress login page – Can I change the markup on the login page?
- Special link for no automatic login (no username and no password)
- Modify wp-login.php Labels Conditionally Based On Referring URL
- Can’t login with any account – No error message shown
- WordPress Login & Register works in localhost but don’t work on server
- WordPress Redirect After logging
- How to login to wordpress via Cpanel
- redirect_to not Including Hashtag from URL
- Hide login page and use wp_login_form on ordinary pages
- Make WordPress User Name the Email Address When Register
- A way to redirect users when they log in based on their current page
- Custom Field For Login
- How can I have customers log in using ONLY customer number? No password
- Login user after registration programmatically
- How to place wp-login.php in page or page template?