1. Home
  2. Knowledge Base
  3. Customizations
  4. PHP Functions
  5. How to Change the Borderline of the Login Fields

How to Change the Borderline of the Login Fields

Introduction

Customizing the border of the login fields on the login page is not a built-in feature of BuddyBoss. However, you can achieve this using a small custom function added to your active theme. This guide explains how to change the borderline of the login fields.

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_logo() {
    echo '<style type="text/css">
        .login form#loginform .input {
            border: 1px solid #000000!important; /* Change #000000 to your preferred color */
        }
    </style>';
}
add_action('login_head', 'custom_login_logo');
  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 border color didn’t change after adding the code.
A: Ensure the code is added to the active theme’s functions.php file. Clear your browser cache and any caching plugin to see the change.

Q: Can I change the border color?
A: Yes. Replace #000000 with any valid color code (hex, RGB, or named color).

Q: Can I adjust the border thickness?
A: Yes. Change the 1px value in border: 1px solid #000000 to your desired thickness.

Q: Will this affect other forms on the site?
A: No. This CSS targets only the login page fields.

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.