Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove Buddypress Admin Bar


  • AJ
    Participant

    @permaculturetreegeek

    I would like to entirely remove the Buddypress admin stuff from the admin bar.

    WP: 3.8
    BP: 1.9.1

    I don’t want to use css – display: none;

    I have tried:

    bp-custom.php in Theme Folder and Plugin Folder.

    <?php
    define( ‘BP_DISABLE_ADMIN_BAR’, true );
    ?>

    In the theme folder it does nothing.
    In the plugin folder it gives this ERROR: Use of undefined constant ‘BP_DISABLE_ADMIN_BAR’ – assumed ‘‘BP_DISABLE_ADMIN_BAR’’ in /wp-content/plugins/bp-custom.php

    also:

    In functions.php:
    add_filter(‘show_admin_bar’, ‘__return_false’);

    this gives the ERROR: Notice: Use of undefined constant ‘show_admin_bar’ – assumed ‘‘show_admin_bar’’ /themes/twentyfourteen/functions.php on line 526

    … and the buddypress docs page for Hiding the Admin Bar is gone! http://codex.buddypress.org/how-to-guides/modifying-the-buddypress-admin-bar/hiding-the-buddypress-admin-bar/

    Anyone know how to remove the buddypress admin menu links from the admin bar?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

  • Henry
    Member

    @henrywright-1

    add_filter(‘show_admin_bar’, ‘__return_false’);

    In that code your '‘s look wonky.

    Try

    add_filter( 'show_admin_bar', '__return_false', 99 );

    I’ve also put a high priority on it to make sure it gets done ( a priority of 99 ).


    AJ
    Participant

    @permaculturetreegeek

    @henry & @Barney – cool… both of those work to get rid of the whole admin bar.

    However, I would like to end up with this:

    If (the user is author) { get rid of all the Buddypress stuff in the admin bar}, else {get rid of the whole admin bar.}

    Like this:

    if ( current_user_can( 'publish_posts' ) ) {
        get rid of all Buddypress stuff in admin bar
    } else {
       add_filter( 'show_admin_bar', '__return_false', 99 );
    }

    My ‘s were wonky in this also:

    define( 'BP_DISABLE_ADMIN_BAR', true );

    No errors, however it still doesn’t work.


    dromy
    Participant

    @dromy

    Did you succeeded?

    I would like to hide the admin option panel (profile and view) when the user is not the owner of the profile.

    can you advice?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove Buddypress Admin Bar’ is closed to new replies.
Skip to toolbar