Log In With Username Only
Stops WordPress from accepting an email address in the login form, so only usernames work.
Opens WPIDE on
Code
remove_filter( 'authenticate', 'wp_authenticate_email_password', 20 );
add_filter( 'gettext', function ( $translation, $text ) {
if ( 'Username or Email Address' === $text ) {
return 'Username';
}
return $translation;
}, 10, 2 );
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.