1. Home
  2. Knowledge Base
  3. Customizations
  4. PHP Functions
  5. How to Change the Hover Color for Forgot Password

How to Change the Hover Color for Forgot Password

Introduction

BuddyBoss does not provide a built-in option to change the hover color of the “Forgot Password” link on the login page. However, you can customize this behavior by adding a small custom function to your active theme. This guide explains how you can change the hover color for forgot password.

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 the_dramatist_custom_login_css() {

    echo ‘<style type=”text/css”>

        #loginform .lostmenot font:hover {

            color: #000000;

        }

    </style>’;

}

add_action( ‘login_head’, ‘the_dramatist_custom_login_css’ );

Note: Replace #000000 with any color value you prefer (HEX, RGB, or color name).

  1. Click Update File to save the changes.

Troubleshooting and FAQs

Q: The hover color is not changing.
A: Make sure the code is added to your active child theme’s functions.php file. Clear any caching plugins and refresh the login page.

Q: Will this affect other links on the login page?
A: No. This CSS targets only the “Forgot Password” link.

Q: Can I revert this change easily?
A: Yes. Simply remove or comment out the code from functions.php and save the file.

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.