This topic has 5 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #167938
     allana
    Participant

    Hi,

    I’m trying to reorder the tabs on the Members pages sing the following code I found on this support forum. Unfortunately its not working. Is there something wrong with it?

    function my_change_profile_tab_order() {

    global $bp;

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

    $bp->bp_nav[‘media’][‘position’] = 20;

    $bp->bp_nav[‘messages’][‘position’] = 30;

    $bp->bp_nav[‘forums’][‘position’] = 40;

    $bp->bp_nav[‘articles’][‘position’] = 50;

    $bp->bp_nav[‘friends’][‘position’] = 60;

    $bp->bp_nav[‘settings’][‘position’] = 70;

    }

    add_action( ‘bp_setup_nav’, ‘my_change_profile_tab_order’, 999 );

    #167945
     allana
    Participant

    Hi, I can now see that this code is ordering the tabs (to some extent) but it doesnt appear to recognise the ‘media’ position. Is it perhaps named something else other than ‘media’?

    #168006
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

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

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #168204
     Radu
    Moderator

    Hi,

    Try to use the

    bp_init hook instead the bp_setup_nav

    COPY CODE
    
    function my_change_profile_tab_order() {
    
    global $bp;
    
    $bp->bp_nav['profile']['position'] = 10;
    
    $bp->bp_nav['media']['position'] = 20;
    
    $bp->bp_nav['messages']['position'] = 30;
    
    $bp->bp_nav['forums']['position'] = 40;
    
    $bp->bp_nav['articles']['position'] = 50;
    
    $bp->bp_nav['friends']['position'] = 60;
    
    $bp->bp_nav['settings']['position'] = 70;
    
    }
    
    add_action( 'bp_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
    #169117
     allana
    Participant

    great, worked 🙂 thanks!

    #169261
     Radu
    Moderator

    Great
    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘Bugs & Issues’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?