add_filter(‘show_admin_bar’, ‘__return_false’);
If you haven’t already, create a bp-custom.php file in the wp-content/plugins directory. Add this to the file:
<?php
// hacks and mods will go here
// disable the WP Toolbar and revert back to the BuddyBar
add_filter( ‘bp_use_wp_admin_bar’, ‘_return_false’ );
?>
i created a bp-custom.php in the wp-content/ plugin directory. Did i need to put the file anywhere? I added add_filter(‘show_admin_bar’, ‘__return_false’); to and nothing happen.
add it in your functions.php or bp-custom.php it work for in the two files.
bp-custom.php file must be uploaded at wp-content/plugins/ folder https://codex.buddypress.org/extending-buddypress/bp-custom-php/
thx @mercime for correction, i thinked is talk about functions.php
I uploaded the bp-custom.php and added the add_filter code in it and the code appear under the admin bar in black letters. what am I doing wrong?
do I add the filiter code in function.php or the bp-custom.php? where do i insert the code or does it matter?
@charlietech – Trying copying the code below:
`add_filter( ‘show_admin_bar’, ‘__return_false’ );`
Sometimes quotes get converted into other characters, which is why the code snippet wasn’t working for you.