Try this snippet. You can add custom error messages based on different error codes.
add_filter( 'login_errors', 'custom_login_errros_callback' );
function custom_login_errros_callback( $error ) {
global $errors;
$err_codes = $errors->get_error_codes();
if ( in_array( 'invalid_username', $err_codes ) ) {
$error="<b>Error:</b> Invalid username/email or password.";
}
if ( in_array( 'incorrect_password', $err_codes ) ) {
$error="<b>Error:</b> Invalid username/email or password.";
}
if ( in_array( 'empty_username', $err_codes ) ) {
$error="<b>Error:</b> Invalid username/email or password.";
}
if ( in_array( 'empty_password', $err_codes ) ) {
$error="<b>Error:</b> Invalid username/email or password.";
}
return $error;
}
Related Posts:
- Disable Or Redirect WP-login.php
- login_enqueue_scripts does not ovewrite the default styles
- Modify wp-login.php labels: Username to Email
- How to change “Registration complete. Please check your e-mail.” in wp-login.php
- How to use wp-login.php page only for logout?
- change register url on wp-login page
- Can’t access wp-admin
- How do you add a custom link to the wordpress login page?
- wp-login.php register/lost password links to buttons?
- How to trigger a login form notice message?
- A child theme version of wp-login
- reset password label text change
- Add text on wordpress admin login page
- Is it possible to remove the version number from the wp-login.php page?
- wp_login_form() redirect not redirecting users < admin
- Login redirect on wp theme
- Can’t log in. Log in button missing [closed]
- Require WP login for outside access
- Modify WP-Login Page With Javascript?
- if username or password is incorrect wp-login returns a blank page
- Where is the email content for retrieve_password_message stored?
- What is the CODEX intercept for wp-login.php?action=lostpassword
- Call header and footer on login page
- Prevent redirect on custom wordpress login form
- Replace standard Login and Register form for Woocommerce [closed]
- How to destroy sessions after a user logout [closed]
- How to add required attribute to wp_login_form fields?
- WordPress “remember me” – How should it work?
- Changing the title of “
- Log In & Log Out Code In Header
- How to fix Sign In option in WordPress
- How can I redirect on a url after successful registration?
- I lock the site’s contents, click on a post, redirect to login, enter uname+password but fail to redirect to article
- How to access the actual input html of the login form
- Creating a custom login on site.
- Login page wordpress tagline remove [duplicate]
- Adding line break in esc_html__
- Copying My account/Login/Register button outside header
- Issue with cookies in wp-login
- Add content in wp login page
- Is it possible to check if password is correct in wp_authenticate_user?
- Modify login page after clicking “login” button, and before it arrives at redirect
- How to enable “remember me” checkbox in login forms by default?
- custom login query for custom login form?
- WordPress reCAPTCHA Problem
- Customizing WordPress Login URL
- It is possible that to get data in wp_login.php to your own php file in wordpress?
- Using gettext on wp-login.php won’t change “Back to site name” text
- Add video to wordpress login page
- WordPress login form with fancybox
- I wanna create a custom login form template
- Add custom field in wp_login_form()
- Retrieve password only by login. Users with same email
- wp-login.php not returning error messages / or gives 404
- Registration page background color covering 1 screen not covering full page
- Disable WordPress 3.6 idle logout / login modal window / session expiration
- Avoid to load default WP styles in login screen
- I want to disable E-Mail verifcation / activation when a user signs up for my WordPress site
- How can I modify the default reset (lost) password email text?
- hook for lostpassword form
- Login with email (WP Modal Login)
- Replace wordpress login logo with custom text
- WordPress custom login page
- How to bypass the username as a required field in registration and just use email address instead?
- Load .txt file for login_message in wp-login.php
- Passing username to login screen
- JavaScript Change focus to password field login page being reset
- Anyway to output the registration form like the login form with wp_login_form()?
- How to change login labels
- How do I replace “Username” in the WordPress login form?
- How to Get Logged-in to “Remote WP Site” from my local script (in Same Browser)?
- Properly customizing login/register form
- How to fix ‘WordPress redirection loop problem in wp-login.php page’?
- Add Custom API Call to WP-Login.php
- Auto login from custom registration form
- White screen of death for wp-admin and error for wp-login.php after entering credentials
- WP not logging in at first time
- How to change wordpress Log In text
- A truely custom login page?
- wp_login_form redirect problem
- Disable Admin CP authentication (or auto login)
- Form Action submit over https
- how to prevent wordpress admin from logging in via woocommerce my-account page
- Possibility to login without password
- wordpress login without password just email address (NO 2 factor authentication with email)
- Disable Remember Me in Login Form
- No plugin populate user information in to form
- How to allow access based on the user meta flag
- When I enter password, I’m redirected to the WordPress login form
- Using is_user_logged_in() to lock down whole site
- Re-style Login Form Whilst Keeping CSS Separate from Frontend CSS
- Check for $ _POST fields in a POST method form
- Styling WordPress login page – Can I change the markup on the login page?
- WordPress cookie issue on login: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”
- Redirect after login to current URL
- Custom Field For Login
- How can I have customers log in using ONLY customer number? No password
- Login user after registration programmatically
- Launch wordpress site to local computer from live website backed-up
- Registration fields prefilled with URL parameters