Don’t like the default option of using ‘username’ to login into your WordPress blog? With a little tweak, you can use email address in additions to existing username for logging into WordPress dashboard.

1. WP Email Login plugin – You can install WP Email Login plugin and forget using your username for logging purpose. It allows you to use your email address inplace of username for WordPress login.

2. Manual code method – If you do not want to use extra plugin for email ID as login username, then you can use following code for the same.

[cc]
function login_with_email_address($username) {
$user = get_user_by_email($username);
if(!empty($user->user_login))
$username = $user->user_login;
return $username;
}
add_action(‘wp_authenticate’,’login_with_email_address’);
[/cc]

You need to add above code to funtions.php file on your WordPress blog. Once it is added, you can use either of email address or default username to login into your WordPress dashboard. Credit Bavotasan

Davinder Singh Kainth

A digital creator with 15+ years of experience in Website Design, Development, SEO, and Content Creation to Podcasting at SmartWebCreators.com with the motto of "Be Smart, Keep Creating". A coach, consultant, and your dear geek friend ❖

Leave a Comment