Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Notificatons only for admin visible

@asianowl

Participant

here’s some clues:

First you need to check the user’s role/capabilities and then remove the navigation menu for these users. For me, I used:

if (current_user_can('none_admin_role')){bp_core_remove_nav_item( 'notifications');}}
add_action( 'wp', 'bp_remove_nav_item' );

You then still need to remove it from the admin bar. My code:

function my_remove_admin_menu(){
	global $wp_admin_bar;

	if (current_user_can('none_admin_role'))
	{
		$wp_admin_bar->remove_menu('notifications');
	}
}
add_action('bp_setup_admin_bar', 'my_remove_admin_menu',301);

hopefully, this does the trick for you. I took me while to figure this out…goodluck.

Skip to toolbar