Hi Chris,
Please usebp_core_remove_nav_item( 'profile');
The code you have used will cause fatal and that’s why your site got down.
Let me know it if works for you or not?
Regards
BrajeshHi Chris,
Please post the complete code for removing the tab. It should not be called directly and should be called on some action(bp_setup_nav) or similar.Regards
BrajeshHI Chris,
Please remove this line at the bottom
bp_core_remove_nav_item( 'profile');
It should not be called directly.
Now, you can add the following to remove profie tab
/** * Remove profile nav. */ function buddydev_remove_profile_tab() { bp_core_remove_nav_item( 'profile' ); } add_action( 'bp_xprofile_setup_nav', 'buddydev_remove_profile_tab' );
That will remove profile tab for all.
Hi Chris,
Once a tab is removed by the above method, It can not be accessed. Do you really want that?If yes, why not disable the components instead if you don’t need them?
Sure. The above code can use with with some additional conditions to remove tab based in certain scenerio.
If you don’t need the tab at all, disabling component seems better.
Regards
Brajesh
The topic ‘ [Resolved] remove tabs from user profiles’ is closed to new replies.