14
Sep
2010

Remove BuddyPress Bar From Some Themes

Never really had a need before but I just set up Donncha’s Domain Mapping plugin and ran into some session issues when logging in and out, in addition to the fact that the BuddyPress bar still uses the main networks URL which is why I think the issue arrises.

Anyway, If you would like have a quick links bar you could always install Admin Bar for those Mapped Domains, the only thing is it doesn’t display in the front end when you logged out, so no random site or login links and such.

Locate the theme directory for the theme you don’t want the BuddyPress bar on and open functions.php then add the following:

remove_action( 'wp_footer', 'bp_core_admin_bar', 8 ); //Front end Buddy
remove_action( 'admin_footer', 'bp_core_admin_bar' ); //Back end Buddy
remove_action('init', 'bp_core_add_admin_bar_css'); // CSS for both front and back

Save and upload, then refresh the site using that theme and the BuddyPress bar will be gone.
And if you don’t want the BuddyPress bar to appear on any site then place the following into you your wp-config.php file:

define( 'BP_DISABLE_ADMIN_BAR’, true );

Hope this saves someone ripping some hair out. lol

Leave a Reply