This topic has 7 replies, 5 voices, and was last updated 9 years by sharmstr.

  • Author
  • #24789
     maxrevz
    Participant

    I would like to move the order of my profile (and group) tabs, is there an easy way to do this?

    Attachments:
    You must be logged in to view attached files.
    #24980
     Catalin
    Moderator

    Hello,

    Hi,
    Those are generated by Buddypress and you can change them by adding this code to wp-content/plugins/bp-custom.php. If the fie doesn’t exit create it:

    COPY CODE
    
    function kleo_change_profile_tab() {
    global $bp;
     
    $bp->bp_nav['profile']['position'] = 10;
    $bp->bp_nav['activity']['position'] = 20;
    $bp->bp_nav['friends']['position'] = 30;
    $bp->bp_nav['groups']['position'] = 40;
    $bp->bp_nav['blogs']['position'] = 50;
    $bp->bp_nav['messages']['position'] = 60;
    $bp->bp_nav['settings']['position'] = 70;
    }
    add_action( 'bp_setup_nav', 'kleo_change_profile_tab', 999 );
     
    define( 'BP_DEFAULT_COMPONENT', 'profile' );
    
    

    Change the order in the above arrays if you like.

    Let me know if this helps.

    Thank you,
    Catalin

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

    This doesnt work :/

    The nav menu does not change and I get error text at the top.

    Attachments:
    You must be logged in to view attached files.
    #25336
     Catalin
    Moderator

    Hello,

    Take a look at this link:

    http://bp-tricks.com/snippets/code/arrange-group-profile-navigation-menu/

    here it is explained better. Add the code in functions.php from your child theme.

    Let me know if this works.

    Thank you,
    Catalin

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

    @Catalin Hi Catalin I am trying to achieve the same as maxrevz but it is also not working for me. I also used the code you linked to http://bp-tricks.com/snippets/code/arrange-group-profile-navigation-menu/
    but it has no effect.

    I inserted in the functions.php in my childtheme. Do I have to make a plugin folder for the functions.php in the child theme ?

    #40847
     Norman
    Participant

    @Catalin I fixed it, i turned out that when I edit the functions.php via my ftp editor it is changing

    ‘ in to ` that was all the problem.

    But it is strange that I can’t reorder the MEDIA from rtmedia, everything else works great.

    I used this ( in case someone needs it ) put it in your child functions.php

    function mb_profile_menu_tabs(){
    global $bp;
    $bp->bp_nav[‘notifications’][‘position’] = 110;
    $bp->bp_nav[‘articles’][‘position’] = 22;
    $bp->bp_nav[‘media’][‘position’] = 14;
    }
    add_action(‘bp_setup_nav’, ‘mb_profile_menu_tabs’, 201);

    #44859
     mcperly
    Participant

    FYI – This wasn’t working for me either. But I simply cut and pasted this code in my text editor. I had to retype everything from scratch. Then it worked perfectly. So if it does not work for anyone, just retype it all in the order you want – do not copy and paste. Hope this helps someone.

    #44860
     sharmstr
    Moderator

    The copy and paste doesn’t work because of the pretty formatting of the single quotes as @Norman found.

    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

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

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

Log in with your credentials

Forgot your details?