Introduction
BuddyBoss uses the default WordPress styling for the “Forgot Your Password?” text on the login page. You can change its color by adding a small custom function to your active theme. This ensures that the text matches your site’s branding or improves visibility for your users. This guide explains how to change the color of the “Forgot Your Password?” text.
Custom Workaround
Before proceeding, make sure you have a complete site backup.
- Navigate to Appearance > Theme Editor in your WordPress admin dashboard.
- Under Select theme to edit, choose your active theme (preferably BuddyBoss Child Theme), then click Select.
- From the Theme Files list, open Theme Functions (functions.php).
- Add the following code just before the closing PHP tag (?>):
function bb_login_custom_css() { ?>
<style>
.login.login-action-lostpassword.bb-login #login > p.message > div {
color: #F397BF;
}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'bb_login_custom_css' );- Click Update File to save the changes.
Troubleshooting and FAQs
Q: The color did not change after adding the code.
A: Clear your browser cache and any caching plugins, then refresh the login page.
Q: Can I use a different color?
A: Yes. Replace #F397BF in the code with any hex color code you prefer.
Q: Will this affect other text on the login page?
A: No. The code specifically targets the “Forgot Your Password?” text; other elements remain unchanged.