In this short blog post, we’ll show you a PHP function to change the username label in WordPress Admin Dashboard.
PHP function to change the username label in WordPress Login
<?php 

/*--------------------------------------------------------------
    CHANGE LOGIN LABEL USERNAME
--------------------------------------------------------------*/ 
add_action( 'login_head', 'login_function' );

function login_function() {
    add_filter( 'gettext', 'username_change', 20, 3 );
    
    function username_change( $translated_text, $text, $domain ) {
        if ( $text === 'Username or Email Address' ) {
            $translated_text = 'OTHER NAME HERE';
        }
        return $translated_text;
    }
}
?>
Tags: Change Login Label, Login Label, WordPress, WP