This topic has 4 replies, 2 voices, and was last updated 8 years by Candrom.

  • Author
  • #96646
     Candrom
    Participant

    Hello,

    I have trouble reordering BuddyPress Profile Menu Items and Items in the top-right drop-down profile menu

    I thought that these items are “buddypress nav tabs”, so I did add custom code to functions.php file, similar to this:

    function my_change_profile_nav_order(){

    global $bp;

    $bp->bp_nav[‘profile’][‘position’] = 10;

     

    but this doesnt seem to do anything.

    #96659
     sharmstr
    Moderator

    It works. You’re probably just not using the correct action which should be init.

    COPY CODE
    
    function my_change_profile_tab_order() {
        global $bp;
        $bp->bp_nav['profile']['position'] = 10;
        $bp->bp_nav['forums']['position'] = 15;
        $bp->bp_nav['activity']['position'] = 20;
        $bp->bp_nav['friends']['position'] = 30;
        $bp->bp_nav['groups']['position'] = 40;
        $bp->bp_nav['messages']['position'] = 60;
        $bp->bp_nav['settings']['position'] = 70;
    }
    add_action( 'init', 'my_change_profile_tab_order', 999 );
    
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    Attachments:
    You must be logged in to view attached files.
    #96663
     Candrom
    Participant

    I copy & pasted your exact code to my child theme functions.php, doesn’t work 🙁

    #96667
     sharmstr
    Moderator

    Works on both of my sites. Maybe you have a plugin overriding it?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #96800
     Candrom
    Participant

    I actually made it work now, somehow my server caching software was acting up.

    Also, you were right, I was using another action, init did indeed work tho! Thanks for that.

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?