Skip to:
Content
Pages
Categories
Search
Top
Bottom

SECOND REQUEST for BuddyPress Admin Login Bar Customization Help

Viewing 2 replies - 1 through 2 (of 2 total)
  • @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/

    @naijaping

    Participant

    if you simply want to hide Admin bar login and sign up, just add

    remove_action( 'bp_adminbar_menus', 'bp_adminbar_login_menu', 2 );

    to your functions.php and login and sign up will go away

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘SECOND REQUEST for BuddyPress Admin Login Bar Customization Help’ is closed to new replies.
Skip to toolbar