Add BuddyBoss Social Login to BuddyX Pro Theme Login/Register Popup

Get Started

This guide explains how to integrate BuddyBoss SSO (Social Login) buttons into the login popup of the BuddyX Pro theme.


✅ Requirements

  • BuddyX Pro Theme
  • BuddyBoss Platform Pro plugin
  • At least one social provider configured (e.g., Google, Facebook)

📄 How It Works

BuddyX Pro uses get_template_part() to load the login form from:

get_template_part( 'template-parts/form', 'login', $args );

To insert BuddyBoss SSO buttons, we need to hook into the login form template, ideally from a plugin or functions.php, and wait for BuddyBoss to fully load.


✅ Recommended Code Snippet

Add the following code to your child theme’s functions.php or a Code Snippets plugin:

add_action( 'bp_init', function() {
    add_action( 'buddyxpro_login_form_top', function() {
        if ( class_exists( 'BB_SSO' ) && method_exists( 'BB_SSO', 'render_buttons_with_container' ) ) {
            echo BB_SSO::render_buttons_with_container([
                'label_type' => 'login',
                'style'      => 'default', // Options: default, grid, icon, fullwidth
            ]);
        }
    }, 5 );
});

📍 How to Hook It In

Make sure that the template part template-parts/form-login.php includes this hook:

do_action( 'buddyxpro_login_form_top' );

If it’s not there, you can edit form-login.php and add it right before the <input name="log" ... > field.


🎨 Style Options

Change the 'style' in the array to customize layout:

  • 'default' – Simple stacked layout
  • 'grid' – Equal-width buttons in grid
  • 'icon' – Small icon-only buttons
  • 'fullwidth' – Large full-width buttons

💡 Notes

  • The buttons only show for logged-out users
  • Only active/connected providers (Google, Facebook, etc.) will be displayed
  • Avoid calling private methods like get_rendered_login_buttons()

✅ Result

Social login buttons will now appear in the login popup of the BuddyX Pro theme, above the username/password fields.

Update on April 14, 2025