Introduction
The BuddyBoss login page aligns the clickable logo to the left by default. You can center the logo using a small custom function added to your active theme. This guide explains how to center the logo on the login page.
Custom Workaround
Before proceeding, make sure you have a complete site backup.
- Go to Appearance > Theme Editor in your WordPress admin dashboard.
- Under Select theme to edit, choose your active theme (preferably a 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_hook_login_enqueue_scripts() { ?>
<style>
body.login.login-split-page #login h1 a {
margin-left: auto !important;
}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'bb_hook_login_enqueue_scripts', 1 );- Click Update File to save the changes.
Troubleshooting and FAQs
Q: The logo is still not centered.
A: Make sure your theme is a Child Theme and that no other custom CSS is overriding this rule. You may need to add margin-right: auto !important; as well if necessary.
Q: Can I make the logo clickable if Private Network is enabled?
A: No. When Private Network is enabled, login and registration page logos are intentionally non-clickable.
Q: Will this affect other pages?
A: No. This CSS only applies to the login page.
Q: Can I revert this change easily?
A: Yes. Remove the code from functions.php and save the file.