[Resolved] How do I get the BuddyBar back?
-
“BuddyPress now uses the WordPress Toolbar. The BuddyBar has been deprecated. (#3596, #3661)”
Copy pasted from http://codex.buddypress.org/releases/version-1-6/
As a temporary solution I was able to find BuddyPresss version 1.5.6, which I installed, but I’d of course love to use the new version and have the BuddyBar.
Website url: http://www.nickyernstsen.dk/spilportal
Thanks in advance.
-
You can use the following code snippet in your /wp-content/plugins/bp-custom.php:
`add_filter( ‘bp_use_wp_admin_bar’, ‘__return_true’ );`
Doesn’t work for some reason.
Where did you put that code?
I tried on my test site; http://nickyernstsen.dk/test/
I made the bp-custom.php file in notepad+++ and entered this;
http://nickyernstsen.dk/spilportal/wp-content/uploads/2012/09/code.jpg
I then uploaded it here; /test/wp-content/plugins
@karmatosed It’s return_false !
add_filter( ‘bp_use_wp_admin_bar’, ‘__return_false’ );`
@Chouf1 : It all depends on what they are using it for – true or false can be used. However the main issue is that you are using a bb-custom.php file there @nickyernstsen. You need bp-custom.php.
InactivePut it in wp-config.php in the root of your site above /* That’s all, stop editing! Happy blogging. */
As @karmatosed pointed out it should work ip bp-custom.php as well you probably just forgot to add the opening and closing php tags like this:
`<?php
add_filter( ‘bp_use_wp_admin_bar’, ‘__return_true’ );
?>`@shawn38: no it should go in bp-custom.php – you should never add things to your wp-config file like that it’s a bit of bad practice.
https://codex.buddypress.org/extending-buddypress/bp-custom-php/ – for reference
Inactive@karmatosed Yes, I agree with you. I should have just wrote the code surrounded be the php tags that goes in bp-custom.php. Sorry Tammy, honest mistake!
@shawn38: no worries but from what was said the issue was initially using bb not bp custom
I made the bb-custom.php file in notepad+++ and entered this;
http://nickyernstsen.dk/spilportal/wp-content/uploads/2012/09/code.jpg
I then uploaded it here; /test/wp-content/plugins
It’s working fine on http://www.nickyernstsen/test, but for some reason it’s not working on http://www.nickyernstsen.dk/spilportal.
@karmatosed, I did, just wrote it wrong here
Any idea why it’s not working on one of my sites?
InactiveAlternatively you can use this code in bp-custom.php:
`<?php
if (!current_user_can(‘manage_options’)) {
add_filter(‘show_admin_bar’, ‘__return_false’);
?>`
Basically it allows the bar which is helpful to admins, but disables it for non-admins.
Cheers!Thx, but I prefer the other option, but I can’t make it work on one of my sites and I did the exact same thing on both sites.
No worries, I finally solved the mystery.
I had to save my bp-custom.php file another place on my computer before uploading it to the FTP.
- The topic ‘[Resolved] How do I get the BuddyBar back?’ is closed to new replies.