oh, the site is http://gigbuddy.org btw
If I can comment it out that would be useful also, Might need it in the future
Phil
You can disable the admin bar completely by putting this in your bp-custom.php:
function my_remove_adminbar(){
remove_action( 'wp_footer', 'bp_core_admin_bar', 8 );
remove_action( 'wp_head', 'bp_core_admin_bar_css', 1 );
remove_action( 'admin_footer', 'bp_core_admin_bar' );
remove_action( 'admin_menu', 'bp_core_add_admin_css' );
}
add_action( 'bp_home_theme_functions', 'my_remove_adminbar');
add_action( 'bp_member_theme_functions' , 'my_remove_adminbar');
If you want to leave the gap that the css reserves for the bar then don’t put in the remove_action()’s for the css. You can disable this by commenting out the two lines: add_action(‘bp_home_theme_functions’…) and add_action(‘bp_member_theme_functions’…).
You can selectively disable/enable it for the home theme or the member theme by choosing to disable/enable it with the above technique also.
The member and home theme’s functions.php file triggers those two functions as the last thing that happens in both areas. The hook is designed to allow just such a thing. I’m so glad that Andy is ‘hook happy’.
Burt, you are a god! Thanks a million
Will test it out shortly.
np Phil. I’m building up a little database of these kind of things and stuffing them into my new dev group here: https://buddypress.org/groups/code-snippets-solution-library
Soon as Andy gets the group forums up and running.
Stupid question #1 – where is bp-custom.php? is it in there or do I have to create it? If I have to create it where do I put it?
Cheers,
Phil
I’ve just realised, are we talking about the same thing here? you mentioned the ‘admin’ bar (grey bar that comes up when you login), that’s a feature I want to keep – it’s the search/login bar I need to disable.
You can just remove the search login bar from the template – Just remove:
<div id="search-login-bar">
<?php bp_search_form() ?>
<?php bp_login_bar() ?>
<div class="clear"></div>
</div>
From header.php of the home and member themes if you are using both.
Well, thanks Andy. I guess it helps to actually read the post first. Remind me not to go into the forums before I’ve had a cup of coffee. I see the word ‘bar’ and read admin bar. Never mind Phil. Cancel all that. Do what Andy says.