I want to hide sub-nav in profile settings
I hide sub-nav comment “wp-contentpluginsbuddypressbp-settingsbp-settings-loader.php”
// Add General Settings nav item
$sub_nav[] = array(
'name' => __( 'General', 'buddypress' ),
'slug' => 'general',
'parent_url' => $settings_link,
'parent_slug' => $this->slug,
'screen_function' => 'bp_settings_screen_general',
'position' => 10,
'user_has_access' => bp_core_can_edit_settings()
);
What sub-nav item are you referring to? If you want to remove the Settings menu option entirely you can do this in a plugin or functions.php
To remove just the Profile option under Settings use this instead:
UPDATE:
The following code will remove the General tab; I believe that is what you want. Correct? This code does that but I am seeing a problem. It might be a rewrite problem on my dev site where the Settings tab causes a 4040 error. Can you try this on your site and let me know?
Finally:
This code is needed in addition to the above. It changes Settings to point to the Email tab. It was defaulting to General and since that was removed we see a 404. This hook must fire earlier than the code that removes ‘general’.