Hi there, I’m trying to remove the notifications tab using this code from this post https://buddydev.com/support/forums/topic/remove-tabs-from-user-profiles/, but it has no effect.
I know I can use css but I want to use php instead.
Should I use a filter instead of an action hook?
/** * Remove profile nav. */ function buddydev_remove_notifications_tab() { bp_core_remove_nav_item( 'notifications' ); } add_action( 'bp_xprofile_setup_nav', 'buddydev_remove_notifications_tab' );
What happens when using this code, will live notifications not work?
Regards
CarstenHi Carsten,
Thank you for the question.1. Please use the code as below. The above action is for “Profile” component.
/** * Remove notifications nav. */ function buddydev_remove_notifications_tab() { bp_core_remove_nav_item( 'notifications' ); } add_action( 'bp_notifications_setup_nav', 'buddydev_remove_notifications_tab' );
2. The live notifications should work fine but their linking may be broken if it links to user’s notification page.
Regards
BrajeshHi Carsten,
It is good to know.
I am glad it worked.
Regards
Brajesh
The topic ‘ [Resolved] Removing the notifications tab’ is closed to new replies.