Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] After upgraded BP 1.7, some codes in functions.php didn’t works


  • @mikey3d
    Participant

    @mikey3d

    I had the functions.php that works but after BP 1.7 some didn’t works

     

    There are two things that didn’t works.

     

    1)  //=Remove the “visit” link from the buddypress admin bar

    remove_action( ‘bp_adminbar_menus’, ‘bp_adminbar_random_menu’, 100 );

     

    2) //=Removing site name logo from admin bar

    remove_action( ‘bp_adminbar_logo’, ‘bp_adminbar_logo’ );

     

    How do I fix this?

     

    Thanks, Mikey3D

Viewing 4 replies - 1 through 4 (of 4 total)

  • Hugo Ashmore
    Keymaster

    @hnla

    The buddybar has been deprecated since V 1.6 in favour of the more elegant and functional WP toolbar is there a reason you need to use the old buddybar? It’s simpler in the long run to try and work with the BP defaults.


    aces
    Participant

    @aces

    While I agree with Hugo that it would be better to upgrade to the WP Adminbar from the legacy buddybar, and I don’t need the functions myself, I did a bit of googling and came up with the very ancient: https://buddypress.org/support/topic/search-function-in-admin-bar/

    The function there no longer seemed to work with plugins_loaded but did work with bp_init when I tried it…

    `function modify_adminbar(){
    remove_action( ‘bp_adminbar_menus’, ‘bp_adminbar_random_menu’, 100 );
    remove_action( ‘bp_adminbar_logo’, ‘bp_adminbar_logo’ );
    }
    add_action(‘bp_init’,’modify_adminbar’,99);`

    Does that work for you?

    https://codex.buddypress.org/developer/theme-development/modifying-the-buddypress-admin-bar/ was also useful….


    @mikey3d
    Participant

    @mikey3d

    Thanks @hnla and @aces

     


    @hnla
    – there is no reason I choose buddybar, it’s just a choice. It takes awhile for me to style CSS on WP toolbar what I want. So I kind of get pretty close what I want.

     


    @aces
    – Yes it does work. Great, I have an optional either toolbars. 🙂


    @mikey3d
    Participant

    @mikey3d

    Oh, there is another reason why I use buddybar is plugin BuddyPress Ninja.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] After upgraded BP 1.7, some codes in functions.php didn’t works’ is closed to new replies.
Skip to toolbar