Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #854482

    John C
    Participant

    I am using the child theme functions.php file to style the page and display some custom text and a logo.

    All I want to do is change the word Username to Email

    My membership software ‘Memberium’ uses the email address as the username but its confusing the members becasue it say Username!!! (yes I have put some explaination text there !!

    Help!

    Thanks

    John

    #854483

    John C
    Participant
    This reply has been marked as private.
    #854607

    Rue Nel
    Moderator

    Hello John,

    Thanks for logging in!

    To change the text “Username” to “Email” in your WP login page, since you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.

    // Change WP login text "Username" to "Email"
    // =============================================================================
    function login_function() {
        add_filter( 'gettext', 'username_change', 20, 3 );
        function username_change( $translated_text, $text, $domain ) {
            if ($text === 'Username'){
                $translated_text = 'Email Address';
            }
            return $translated_text;
        }
    }
    add_action( 'login_head', 'login_function' );
    // =============================================================================

    We would loved to know if this has work for you. Thank you.

    #855466

    John C
    Participant

    That’s why I love theme.co

    YES, that worked a treat. I wish I understood how and why! 🙂 But it works so that’s good enough for me.

    Thank you very much

    John

    #855900

    Christian
    Moderator

    You’re welcome. Glad we could help. 🙂