@jordynn
Add the following remove_action to your functions.php or bp-custom.php file:
remove_action( ‘bp_adminbar_menus’, ‘bp_adminbar_notifications_menu’, 8 );
@pcwriter
Thanks for your quick reply!
This worked perfectly to remove the ‘Notifications’ link in the admin bar. However, I’d like to be able to remove the ‘Notifications’ tab where the member edits their profile and settings.
This is a better screen shot: http://jordynnmackenzie.com/koperscastle/wp-content/uploads/2011/02/screenshot_bpissue2_feb142011.jpg
I want to hide the tab that is marked in red.
@jordynn
To remove the notifications subnav item, add the following snippet to your functions.php file:
`function remove_notifications_subnav(){
global $bp;
if ( $bp->current_component == $bp->settings->slug ) {
bp_core_remove_subnav_item($bp->settings->slug, ‘notifications’);
}
}
add_action( ‘wp’, ‘remove_notifications_subnav’, 2 );`
This is a simple function taken from this post by @mariochampion
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-remove-and-add-items-in-bp_get_displayed_user_nav/?topic_page=2&num=15#post-71265
Hope this helps!
OK, I’m hoping someone else can chime in here with a way to remove the “Notifications” subnav item from the “My Account” adminbar menu, ‘cuz that’s one I haven’t been able to figure out
Thanks @pcwriter! (and @mariochampion!)
That piece of code solved my issue! It has removed the “notifications” subnav from the “My Account” adminbar menu too.
Edit: It seems to only remove the “Notifications” subnav in the “My Account” adminbar menu when I’m looking at the …/members/admin/settings/ page
Doh! (he says… with a hearty slap to the forehead). I had forgotten to remove the `current_component` condition.
Change the “if” line of the code to this:
`if ( $bp->settings->slug ) {`
It’ll work just fine now.
Brilliant!
Thanks for your help @pcwriter!!
You’re welcome! Glad it worked out.
Hi, I tried this code but it doesn’t seem to do anything? Is there a change that needs to be made to it for latest BuddyPress versions?
Thanks.