Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to move Settings subnav item positions

  • @scylderon

    Member

    Hey all. I’ve found answers for how to unset and add subnav items, but not how to move tab positions. I’ve done it with the normal usernav ($bp->bp_nav = 10; etc), but I’m looking to make the Notifications (under Settings) tab the default one, essentially switching the position of General [10] and Notifications [20]. Make sense? Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • @shawnyuan

    Member

    Do the following. You will need to edit 2 numbers in the code.

    1. Open the php file at /plugins/buddypress/bp-core/bp-core-settings.php

    2. Go to this function:
    `function bp_core_add_settings_nav()`

    3. Find this line and change the “10” to “20”.
    `bp_core_new_subnav_item( array( ‘name’ => __( ‘General’, ‘buddypress’ ), ‘slug’ => ‘general’, ‘parent_url’ => $settings_link, ‘parent_slug’ => $bp->settings->slug, ‘screen_function’ => ‘bp_core_screen_general_settings’, ‘position’ => 10, ‘user_has_access’ => bp_is_my_profile() ) );`

    4. 3. Find this line and change the “20” to “10”.

    `bp_core_new_subnav_item( array( ‘name’ => __( ‘Notifications’, ‘buddypress’ ), ‘slug’ => ‘notifications’, ‘parent_url’ => $settings_link, ‘parent_slug’ => $bp->settings->slug, ‘screen_function’ => ‘bp_core_screen_notification_settings’, ‘position’ => 20, ‘user_has_access’ => bp_is_my_profile() ) );`

    @ajaxmac

    Participant

    Any edits to the core of buddypress will be lost when you upgrade. Not a great idea.

    @dains

    Participant

    There’s a related method in this link for setting the Forums tab to default in Groups, maybe this will help.

    http://themekraft.com/2011/02/customize-profile-and-group-menus-in-buddypress/#comment-42

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to move Settings subnav item positions’ is closed to new replies.
Skip to toolbar