1. Home
  2. Knowledge Base
  3. Customizations
  4. PHP Functions
  5. How to Change the Font Color of Username and Password on the Login Page

How to Change the Font Color of Username and Password on the Login Page

Introduction

The login page in BuddyBoss does not provide an option to change the font color of the username and password fields. You can achieve this by adding a small custom function to your active theme. This guide explains how to change the font color of username and password on the login page

Custom Workaround

Before proceeding, make sure you have a complete site backup.

  1. Go to Appearance > Theme Editor in your WordPress admin dashboard.
  2. Under Select theme to edit, choose your active theme (preferably a BuddyBoss Child Theme), then click Select.
  3. From the Theme Files list, open Theme Functions (functions.php).
  4. Add the following code just before the closing PHP tag (?>):
function custom_login_css() {
    echo '<style type="text/css">
        #loginform input[type=email],
        #loginform input[type=text],
        #loginform input[type=password] {
            color: #000000 !important;
        }
    </style>';
}
add_action('login_head', 'custom_login_css');
  1. Click Update File to save the changes.

Note: Modifications are typically considered custom work, but we are making an exception in this case. Please review the BuddyBoss Support Policy.

Troubleshooting and FAQs

Q: The font color didn’t change after adding the code.
A: Make sure the code is added to the active theme’s functions.php file and that your browser cache is cleared.

Q: Can I change the color to a different one?
A: Yes. Replace #000000 with any valid HEX, RGB, or color name you prefer.

Q: Will this affect the registration page as well?
A: This code targets the login form specifically. If your registration form uses the same CSS selectors, it will also apply there.

Q: Is this officially supported by BuddyBoss?
A: No. This is considered custom work.

Was this article helpful?

Related Articles

Subscribe to Our Newsletter

Stay In Touch

Subscribe to our Newsletter, and we’ll send you the latest news from BuddyBoss

  • This field is hidden when viewing the form
  • This field is for validation purposes and should be left unchanged.

To speak to our Agency consultant, fill in the form found at our Contact Page.

  • Get Started

    Enter your name and email address to get started with your project...

  • This field is for validation purposes and should be left unchanged.