Unless someone has a better option, you can remove the code from the footer.php so that the admin/header bar does not show up. You’ll also have to tweak the css so the padding on the top of the page is removed.
There is probably a more elegant way though.
Isn’t there just an option button in the admin somewhere that says “show admin bar?”
Or am I thinking of WPMU?
The only option I’ve found is to turn it off for non-logged in users but I couldn’t find a way to turn it off for all users.
Regardless, I did comment out the necessary code in the footer.php but I was hoping there was a ‘non-hacky’ way to go about it.
ok – I’ve decided to leave this bar on for all users but what I’d like to do is to remove some of the options for logged in users. Specifically, there is a ‘BuddyPress’ link in the far left that I want to remove, the ‘My Blogs’ and the ‘Visit’ in the far right are the options I want to remove. Anyone know how to do so without hacking the code? If hacking is the only option, where do I find the relevant code? Thanks in advance for any insights.
bp-core-adminbar.php controls what is on the menu. I used it to remove the visit tab on the far right and replace with my own links.
If you do a view source you can find the location of the buddypress logo on far left. I replaced that logo with my own logo, and it takes the reader back to the home page of the site.
http://greathistory.com
Is it not possible to use:
`<?php if (is_user_logged_in()){
echo “ALL CODE IN HERE”;
}
else {
echo “NO CODE IN HERE”;
};
?>’
I see that you changed your mind about leaving the admin bar on. In case you change it again, the ‘non hackey’ way to turn off the admin bar is in your bp-custom.php file (you got one even if you didn’t know it, create one, it gets loaded before all else in bp’s wakeup sequence) put this code:
function oci_noadminbar(){
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’ );
}
add_action( ‘wp_head’, ‘oci_noadminbar’, 1 );
add_action(‘admin_head’, ‘oci_noadminbar’, 1);
In the time available to me I couldn’t ferret out where the backend css for the admin bar was enqueued. So we got a gap where it should be but no admin bar. ‘eh?
@smueller @ burtadsit navigate to mu-plugins, bp-core then you will see admin-bar.css in the css folder. You can delete the body style, this will remove the top whitespace.
btw the suggestion from burt adsit does not work.
Im currently trying to work out a way to remove the bar from only one domain in a BP install. Though the function does get called in the bp-custom it does not remove the bar.
Lynchmob-
This thread has not had any activity in more than 3 months. Since then, the BuddyPress codebase has changed considerably, so the solutions presented here may be out of date.
Please reads this: https://buddypress.org/forums/topic.php?id=2543