Introduction
BuddyBoss does not provide an option to remove the Generate Password button on the password reset page. You can hide this button by adding a small custom function to your active theme. This guide explains how you can remove the Generate Password button on the password reset page.
Custom Workaround
Before proceeding, make sure you have a complete site backup.
- In your WordPress admin dashboard, go to Appearance > Theme Editor.
- Under Select theme to edit, choose your active theme (preferably BuddyBoss Child Theme), then click Select.
- From the Theme Files list, click Theme Functions (functions.php).
- Paste the following code just before the closing PHP tag (?>):
add_filter( 'random_password', 'disable_random_password', 10, 2 );
function disable_random_password( $password ) {
$action = isset( $_GET['action'] ) ? $_GET['action'] : '';
if ( 'wp-login.php' === $GLOBALS['pagenow'] && ( 'rp' == $action || 'resetpass' == $action ) ) {
return '';
}
return $password;
}
function login_fields_border() {
echo '<style> button.button.wp-generate-pw.hide-if-no-js { display: none !important; } </style>';
}
add_action('login_head', 'login_fields_border');
- Click Update File to save your changes.
Troubleshooting and FAQs
Q: The Generate Password button is still visible, what should I check?
A: Make sure the code is added to the active theme’s functions.php and clear any caching plugins.
Q: Will this affect the password reset functionality?
A: No, users can still reset their password manually.
Q: Can I hide other elements on the password reset page?
A: Yes, you can target other elements using custom CSS in the same function.
Q: Can I revert this change easily?
A: Yes, remove the code from functions.php and save.
Q: Who can I contact for further assistance?
A: Please review the BuddyBoss Support Policy or consult a developer.