Skip to:
Content
Pages
Categories
Search
Top
Bottom

WP adminbar / BP buddybar bug/issue?

  • @aces

    Participant

    I recently had a problem with the wp admin bar / buddybar and suspect it is a bug in buddypress.

    I wanted to use the wp admin bar in admin (because I couldn’t easily get rid of it) and the bp admin bar in public (because it had previously been there – when logged in).

    So I used the following in bp-custom-php
    `if ( is_admin() ) {
    define( ‘BP_USE_WP_ADMIN_BAR’, true );
    remove_action( ‘admin_footer’, ‘bp_core_admin_bar’ );
    }
    `
    This is because the buddybar showed up as well the wp admin bar. I wouldn’t have noticed except for a bug in wordpress 3.3.* and ie9 (add new media page) that I can’t explain how to duplicate ( even though I see it on various different sites )….

    On the admin side the buddypress menu showed up unstyled underneath the page as well as in the ‘Howdy’ menu without the `remove_action`….

    Surely the remove action shouldn’t be necessary, or is something else going wrong somewhere? Am I going insane?

    EDIT: I just tried it again and it works as expected without the remove action so I think it must have been a caching issue – still have the WP bug though…

Viewing 9 replies - 1 through 9 (of 9 total)
  • @hiresphereadmin

    Member

    No Aces…..you are not insane at all!!! You have become my hero, only I copied and pasted your code into custom php and still no buddybar……please put your cape on and save me once again……what am I doing wrong????

    @aces

    Participant

    I put it in bp-custom-php – actually it also worked in functions.php

    I’m not sure if you want the same functionality. Wrapping in `is_admin` was so that the following lines only worked on the admin pages. `remove_action` shouldn’t be necessary.

    The `define` line tells buddypress to use the wp adminbar. This adds the personal menu under your name like on this page and gets rid of some blank space under the menu bar. It also stops the buddybar being rendered (behind the WP admin bar – see WP bug mentioned above). I can not find a simple way to use the buddybar instead of the wp adminbar on the admin page – but I think that’s the way WordPress wants it to work…

    For the public facing side I have selected Hide admin bar for logged out users? so you only see the buddybar when logged in.

    What are you trying to achieve?

    @hiresphereadmin

    Member

    I’m trying to get my buddybar back, but the kick of it is, I customized my buddybar with poedit, so it’s not the default that comes with buddypress. I only want the buddybar (and some menu options) to be available to registered, loggedin users……more or less to keep out the “snoops”

    @hiresphereadmin

    Member

    Tried this is custom php, but got error message:(Fatal error: Call to undefined function bp_get_profile_field_data() in /home/content/42/8142642/html/wp-content/plugins/bp-custom.php on line 4)

    if ( $data = bp_get_profile_field_data( ‘field=user-groups ‘ ) ) : ?>

    Groups: <a href=http://hiresphere.net/user-groups/?s=” title=””>

    @aces

    Participant

    what’s on line 4 of bp-custom.php?
    What happens if you put just
    `define( ‘BP_USE_WP_ADMIN_BAR’, true );`
    on it’s own..

    @hiresphereadmin

    Member

    Nothing……i used your snippet of code and nothing changed…..no buddybar……line 4 is: /?s=<?php

    echo $data ?>” title=””>

    @hiresphereadmin

    Member

    uggg…..it didn’t all come out……hang a sec

    @hiresphereadmin

    Member

    “”>

    @hiresphereadmin

    Member

    ok……i’m a mess i guess…..it’s not typing out in my replies

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘WP adminbar / BP buddybar bug/issue?’ is closed to new replies.
Skip to toolbar