Skip to:
Content
Pages
Categories
Search
Top
Bottom

remove admin-bar

  • @blogono

    Participant

    hello,

    is it possible to remove the default buddypress admin-bar at some themes (eg the home theme) if you want ??

    is there any hook that calls the admin-bar and that can be removed in the template-files??

    regards,

    mark

Viewing 19 replies - 1 through 19 (of 19 total)
  • @burtadsit

    Participant

    In bp-core-adminbar.php are the two hooks:

    add_action( ‘wp_footer’, ‘bp_core_admin_bar’, 8 );

    add_action( ‘admin_footer’, ‘bp_core_admin_bar’ );

    These fire up the admin bar. If you want to remove it just put the following in your bp-custom.php file:

    remove_action( ‘wp_footer’, ‘bp_core_admin_bar’, 8 );

    remove_action( ‘admin_footer’, ‘bp_core_admin_bar’ );

    You’ll have to wrap those two calls in some logic of your own creation to decide when to not display the admin bar.

    @blogono

    Participant

    thats great … thank you a lot, burtadsit!

    just added the code at the buttom of the home-template and the admin-bar disappeared

    thx

    regards,

    mark

    @blogono

    Participant

    better to add the code at the index-file of your home template.

    regards,

    mark

    @filan

    Participant

    Hi

    I added the code at the index-file and the Admin-bar was removed. But now there is a white background in its place,

    any ideas to remove this, white background, also?

    @burtadsit

    Participant

    The css reserves a spot for the admin bar.

    remove_action( ‘wp_head’, ‘bp_core_admin_bar_css’, 1 );

    Wherever you put the other statements.

    @filan

    Participant

    HI

    Thanks for the tip, it didn’t work though.

    remove_action( ‘wp_footer’, ‘bp_core_admin_bar’, 8 );

    remove_action( ‘admin_footer’, ‘bp_core_admin_bar’ );

    remove_action( ‘wp_head’, ‘bp_core_admin_bar_css’, 1 );

    do you have any idea of wear to put all the code, which particular file?

    @filan

    Participant

    For all rookies out there, like me,

    if the remove_action doesn’t work for you: I did this and the css-adminbar was removed:

    in the bp-core-cssjs.php file

    add “//” to this line: add_action( ‘wp_head’, ‘bp_core_admin_bar_css’ );

    @lancewillett

    Participant

    As of revision 1270 in trunk you can now disable the admin bar like this in your “wp-config” file:

    define('BP_DISABLE_ADMIN_BAR', true);

    That way you don’t need any of those custom overrides in your “bp-custom” file.

    @tdh

    Participant

    Am I doing something wrong here? I don\’t seem to be able to use those overrides in the bp-custom.php file, probably because it is called before the admin bar functions gets registered. How should I do this?

    Edit: I don’t actually want to REMOVE the admin bar altogether, just hack the stuff it does without touching core.

    @tdh

    Participant

    I think I solved this to my liking. Putting these things in a plugin and running it in mu-plugins did the trick. :)

    @burtadsit

    Participant

    @valuser

    Participant

    define(‘BP_DISABLE_ADMIN_BAR’, true); worked up to 1.29
    in bp 1.5 beta 2 on a multisite it works but whitespace takes it place

    @valuser

    Participant

    define(‘BP_DISABLE_ADMIN_BAR’, true); + Hide admin bar for logged out users NO works

    @arichero

    Member

    any news on hiding the admin bar and not getting the whitespace on bp 1.5 beta 2? thanks

    @arichero

    Member

    still the same on bp 1.5 beta 3 – any idea?

    @arichero

    Member

    ok, found away
    just add remove_action( ‘bp_init’, ‘bp_core_load_buddybar_css’ ); to the functions.php file

    @bigdaddyteemoe

    Participant

    OR, you can be super lazy and add this at the bottom of your footer

    #wpadminbar {
    display: none;
    }

    Of course, this goes in a style tag, but it won’t show up because these comments support nodes.

    No muss, no fuss.

    @richardicanie

    Participant

    In the latest BuddyPress – 1.9 – i want to hide the admin bar but keep it for WP site users (editors, admins) that aren’t BP users? Is that possible?

    @mattg123

    Participant
Viewing 19 replies - 1 through 19 (of 19 total)
  • The topic ‘remove admin-bar’ is closed to new replies.
Skip to toolbar