I’m trying to put the settings tab under the profile as a submenu item, but I can’t figure out how to do it. So far, I found this code, which is removing the settings tab, but can’t get it to be moved under profile…
Thanks in advance!
// SET BP SUBMENUS
function add_settings_subnav_tab() {
global $bp;
// remove settings menu
unset($bp->bp_nav['settings']);
// add settings sub-menu under profile
bp_core_new_subnav_item( array(
'name' => 'Settings',
'slug' => 'settings',
'parent_id' => 'profile',
'parent_url' => $bp->loggedin_user->domain . $bp->bp_nav['profile']['slug'] . '/',
'parent_slug' => $bp->bp_nav['profile']['slug'],
'screen_function' => 'bp_settings_screen_general',
'position' => 30
)
);
}
add_action( 'bp_setup_nav', 'add_settings_subnav_tab', 1002 );