• Resolved katod

    (@katod)


    Customize Login Screen is working well except I can’t change the top input label from “Email Address” to “Username or Email Address”.

    Before I started customizing, the default wp-login.php with wordpress logo had the label “Email Address” and that is what is displaying no matter what I try to change it to in Branda (which so far has been intuitive and easy to use.)

    It seems like there is a setting in WordPress somewhere that is a higher authority than Branda for this label. The Branda templates all show “Username or Email Address” and that is the default label in the dashboard but it’s not showing up on the front end.

    Maybe there is simply a checkbox for this in the wordpress settings or a template I can change that is hard coded. Also, a username works for logging in just fine even though the label says Email Address.

    Thank you for help with this.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Zafer – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @katod,

    I hope you are doing well today!

    I assume you already set Branda->Front-end->Login Screen->Content->Username input label to “Username or Email Address”
    https://wpmudev.com/docs/wpmu-dev-plugins/branda/#login-screen-form

    Some themes or plugins might be implementing their own labels for the login fields, which might override those defined in Branda.

    You can try changing text via built-in Branda text replacement tool
    https://wpmudev.com/docs/wpmu-dev-plugins/branda/#text-replacement

    If this does not help, alternatively, you can use the following code with a child theme or as a mu-plugin:

    function custom_login_username( $translated_text, $text, $domain ) {
    switch ( $translated_text ) {
    case 'Email Address' :
    $translated_text = __( 'Username or Email Address', 'theme_text_domain' );
    break;
    }
    return $translated_text;
    }
    add_filter( 'gettext', 'custom_login_username', 20, 3 );

    Put the above code in your theme’s functions.php file. This should work, but do remember always to use child themes while editing or adding code to your theme’s functions.php file because the changes you made will be lost upon theme update if not using a child theme.

    In the provided snippet, ‘theme_text_domain’ needs to be replaced with your theme’s text domain. That could be the name of your theme in most cases. If you’re unsure, you can find the text domain in your theme’s style.css header.

    If you want to implement this code snippet as mu-plugin then you can find more information below on how to use mu-plugins.
    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins
    and
    https://www.ads-software.com/support/article/must-use-plugins/

    Kind regards,
    Zafer

    Thread Starter katod

    (@katod)

    Hi Zafer @wpmudevsupport15

    I did a full conflict test with all plugins off and a generic theme and “Username or Password” appeared and the Branda plugin is controlling this label. I was able to change it to anything. I turned on the plugins one by one and it turns out the “higher authority” is BuddyBoss Platform that is forcing it to say “Email Address”. So that is a direction for me to investigate to get to the bottom of it.

    In the meantime, I tried both methods you suggested separately (1. using Text Replacement in Branda and 2. using the code snippet in the child theme functions) and they both worked to override BuddyBoss to say “Username or Email Address” on the login form. In addition, I poked around my site including the checkout page and the edit profile page and I didn’t see any places where Email Address was inadvertently changed to “Username or Email Address” so those will get me going until I crack BuddyBoss.

    Thank you so much for your help and prompt reply!

    Kato D

    Plugin Support Zafer – WPMU DEV Support

    (@wpmudevsupport15)

    Hi again @katod,

    We are happy to hear that the issue has been resolved and marking this thread accordingly.
    Please let us know in case you need further help.

    Kind regards,
    Zafer

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Customize Login Screen not changing input box label to “Username or…”’ is closed to new replies.