Code Snippets

Re-Arrange the Group and Profile Navigation Menu

Add the following to your functions.php or bp-custom.php file:


function tricks_change_bp_tag_position()
{
global $bp;
//for groups and other component like links etc
$bp->bp_options_nav['groups']['activity']['position'] = 10;
$bp->bp_options_nav['groups']['forum']['position'] = 40;
$bp->bp_options_nav['groups']['gallery']['position'] = 30;//change it to see the effect
$bp->bp_options_nav['groups']['admin']['position'] = 120;
$bp->bp_options_nav['groups']['members']['position'] = 20;
$bp->bp_options_nav['groups']['send-invites']['position'] = 11;

/*function tricks_change_bp_tag_position()
{
global $bp;
$bp->bp_nav['profile']['position'] = 10;
$bp->bp_nav['forum']['position'] = 20;
$bp->bp_nav['gallery']['position'] = 30;
$bp->bp_nav['posts']['position'] = 40;
$bp->bp_nav['activity']['position'] = 50;
$bp->bp_nav['blogs']['position'] = 60;
$bp->bp_nav['friends']['position'] = 70;
$bp->bp_nav['messages']['position'] = 80;
$bp->bp_nav['groups']['position'] = 90;
$bp->bp_nav['settings']['position'] = 100;
}
add_action( 'bp_init', 'tricks_change_bp_tag_position', 999 );

}
add_action( 'wp_head', 'tricks_change_bp_tag_position',9 );

That’s it!

About Bowe Frankema

 Re Arrange the Group and Profile Navigation Menu Building communities on BuddyPress is something I’m very passionate about. The decision to focus exclusively on BuddyPress projects over the last few years inspired me to share back some of the things I've learned here on BP-Tricks! You can find me on WordCamps & BuddyCamps across the globe and on Twitter! Follow me on Twitter

I'm constantly updating my BuddyPress Hosting Guide and SiteGround and WPEngine
have proven to be a great fit for hosting your BuddyPress community.

Need some help finding the perfect host? Check out my in-depth BuddyPress Hosting guide!

Discussion

9 responses to ‘Re-Arrange the Group and Profile Navigation Menu

  1. Hi Juanma,

    Quick tips sometimes do not have screenshots. It also depends on the trick submitter that sends in the trick. Most of the time I’ll try to include screenshots, but since this trick was not written by me, I can’t test or create screenshots for all tricks.

    But feel free to send in your BuddyPress tricks, it’s very much appreciated!

  2. Hello sir,
    After i change some setting / themes i got error while i test buddypress site in my localhost, please give me solution how to remove that error.

    I got the error now buddypress is not working.

    please guide me

    Fatal error: Cannot redeclare bp_dtheme_ajax_querystring() (previously declared in C:\Program Files\VertrigoServ\www\buddy\wp-content\plugins\buddypress\bp-themes\bp-default\_inc\ajax.php:20) in C:\Program Files\VertrigoServ\www\buddy\wp-content\themes\dusk\_inc\ajax.php on line 63

    please guide me.

    Thanks

  3. Hey thanks for putting this up!
    I, however, don’t understand how to put it into the functions.php code. When i tried i got an error saying “unexpected $end on………../functions.php line 547″ (<could be mistaken about the line) but could you let me know how you actually put it into functions.php.

  4. What about the tabs in the secondary menu?

    Like under “Activity” the ones that correspond to:

    Personal
    Friends
    Groups
    Favorites

    How do we change the labels for those !??!?!?

    Thanks

  5. I would like to also know how to move say some top level menus (like Following or Followers) to a sub level menu (like under a Social menu from the top = where social maybe is just the Activity page). Is that possible?

  6. I also found it was causing an unexpected $end error; so I used the following code instead. Please note that if you don’t have a Blog or aren’t using Private messages, you will need to remove those rows otherwise you end up with strange little navigation styling problems.
    To change the positions, change the numbers at the end. The lowest number shows on the left, the highest on the right. You don’t need to move the rows, just change the number. e.g. changng profile to 100 will make it appear at the right-hand end.

    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;
    }
    add_action('bp_setup_nav', 'bbg_change_profile_tab_order', 999 );

    P.S. This should be put in your child themes functions.php or functions-custom.php file.
    P.P.S. if code in brackets shows up, please do not copy these into your your functions file; they are “hopefully” going to turn the above into code!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>