Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: SECOND REQUEST for BuddyPress Admin Login Bar Customization Help

@boonebgorges

Keymaster

This is not quite as straightforward as it ought to be (given that you want to keep the Log In button, which is rendered by the same function). Put the following in your plugins/bp-custom.php file:

function bbg_customize_adminbar_hooks() {
remove_action( 'bp_adminbar_menus', 'bp_adminbar_login_menu', 2 );
}
add_action( 'bp_loaded', 'bbg_customize_adminbar_hooks', 999 );

function bbg_adminbar_login_menu() {
global $bp;

if ( is_user_logged_in() )
return false;

echo '<li class="bp-login no-arrow"><a>root_domain . '/wp-login.php?redirect_to=' . urlencode( $bp->root_domain ) . '">' . __( 'Log In', 'buddypress' ) . '</a></li>';
}
add_action( 'bp_adminbar_menus', 'bbg_adminbar_login_menu', 2 );

Here’s a bit more about bp-custom.php, in case you haven’t used it before https://codex.buddypress.org/extending-buddypress/bp-custom-php/

Skip to toolbar