Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide Notification Settings

Viewing 9 replies - 1 through 9 (of 9 total)
  • Profile photo of pcwriter
    pcwriter
    Participant

    @pcwriter

    @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 );

    Profile photo of jordynn
    jordynn
    Member

    @jordynn

    @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.

    Profile photo of pcwriter
    pcwriter
    Participant

    @pcwriter

    @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! :-)

    Profile photo of pcwriter
    pcwriter
    Participant

    @pcwriter

    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 :-(

    Profile photo of jordynn
    jordynn
    Member

    @jordynn

    Thanks @pcwriter! (and @mariochampion!)

    That piece of code solved my issue! It has removed the “notifications” subnav from the “My Account” adminbar menu too.

    :D

    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

    Profile photo of pcwriter
    pcwriter
    Participant

    @pcwriter

    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.

    Profile photo of jordynn
    jordynn
    Member

    @jordynn

    Brilliant!

    Thanks for your help @pcwriter!!

    Profile photo of pcwriter
    pcwriter
    Participant

    @pcwriter

    You’re welcome! Glad it worked out. :-)

    Profile photo of GSJ
    GSJ
    Participant

    @gsj

    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.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Hide Notification Settings’ is closed to new replies.