This example demonstrates how to remove the Notifications item from the BuddyPress Settings default navigation menu. Simply add the code below to your theme’s functions.php file.
Here is a similar example that could be used to remove the System Notices menu from the Messages section.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Remove Messages->Notices | |
function skw_remove_notices_subnav() { | |
global $bp; | |
if ( $bp->current_component == $bp->messages->slug ) { | |
bp_core_remove_subnav_item( $bp->messages->slug, 'notices' ); | |
} | |
} | |
add_action( 'wp', 'skw_remove_notices_subnav', 11 ); |