Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] How do I get the BuddyBar back?

Viewing 16 replies - 1 through 16 (of 16 total)
  • @karmatosed

    Moderator

    You can use the following code snippet in your /wp-content/plugins/bp-custom.php:

    `add_filter( ‘bp_use_wp_admin_bar’, ‘__return_true’ );`

    @nickyernstsen

    Member

    Doesn’t work for some reason.

    @karmatosed

    Moderator

    Where did you put that code?

    @nickyernstsen

    Member

    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

    @chouf1

    Participant

    @karmatosed It’s return_false !

    add_filter( ‘bp_use_wp_admin_bar’, ‘__return_false’ );`

    @karmatosed

    Moderator

    @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.

    Inactive

    Put 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’ );
    ?>`

    @karmatosed

    Moderator

    @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! :-)

    @karmatosed

    Moderator

    @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

    @nickyernstsen

    Member

    It’s working fine on http://www.nickyernstsen/test, but for some reason it’s not working on http://www.nickyernstsen.dk/spilportal.

    @nickyernstsen

    Member

    @karmatosed, I did, just wrote it wrong here :-)

    @nickyernstsen

    Member

    Any idea why it’s not working on one of my sites?

    Inactive

    Alternatively 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!

    @nickyernstsen

    Member

    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.

    @nickyernstsen

    Member

    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.

Viewing 16 replies - 1 through 16 (of 16 total)
  • The topic ‘[Resolved] How do I get the BuddyBar back?’ is closed to new replies.
Skip to toolbar