Skip to:
Content
Pages
Categories
Search
Top
Bottom

bp-custom.php bp nav


  • codyt
    Participant

    @codyt

    Wordpress 4.4
    Buddypress 2.4.3

    I’m just starting to use bp-custom.php and trying to add a new tab to the BP menu.
    For some reason any changes I make to this function does not effect anything.
    Not even the order of other tabs. My bp-custom.php file is in wp-content/plugins.
    I must be missing something simple.

    <?php
    function bbg_change_profile_tab_order() {
    global $bp;

    $bp->bp_nav[‘profile’][‘position’] = 10;
    $bp->bp_nav[‘activity’][‘position’] = 20;
    $bp->bp_nav[‘blogs’][‘position’] = 30;
    $bp->bp_nav[‘friends’][‘position’] = 40;
    $bp->bp_nav[‘messages’][‘position’] = 50;
    $bp->bp_nav[‘groups’][‘position’] = 60;
    $bp->bp_nav[‘settings’][‘position’] = 70;
    $bp->bp_nav[‘characters’][‘position’] = 80;
    }
    add_action(‘bp_setup_nav’, ‘bbg_change_profile_tab_order’, 999 );
    ?>

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

  • Henry Wright
    Moderator

    @henrywright

    Maybe the 999 priority is too late? Try setting it to something like 8. This is guesswork so forgive me.


    codyt
    Participant

    @codyt

    It’s working now but the priority didn’t change anything. I’m not sure why it’s working now. I did figured out how to turn some of the tabs off courtesy of this site. However I still can’t find a way to add my own tab named “characters”. Maybe I just have to make a copy of a tab, change the name and then link it to the the page I want. If I find out how, I will let you know.

    Thanks Henry!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘bp-custom.php bp nav’ is closed to new replies.
Skip to toolbar