I tried to do this, but it doesn’t seem to work. can anyone help?
<?php
define ('BP_ROOT_BLOG', 2);
if (blog_id!=BP_ROOT_BLOG) {
remove_action( 'wp_footer', 'bp_core_admin_bar', 8 );
}
?>
hi Ivan
try this one, put it into your bp-custom.php
function remove_bpadminbar(){
global $current_site;
if($current_site->blog_id!=BP_ROOT_BLOG) {
/*if current blog is not the one on which buddypress is activated*/
remove_action( 'wp_footer', 'bp_core_admin_bar', 8 );//remove buddypress admin bar
}
}
add_action("wp","remove_bpadminbar");
This should work.