Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove the General Settings in BuddyPress v1.6.1

  • @wpmirwin

    Participant

    Hello,

    First off, this question has already already been answered in the forum for BuddyPress v1.2.5.2, but the solution doesn’t seem to work in the latest version of BuddyPress (1.6.1).

    The previous thread can be found here:

    http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/hide-general-settings/

    I would like to do this exact same thing in BP v1.6.1.

    * Remove the “General Settings” subnav menu (currently the default)
    * Remove the “Delete Account” subnav menu (maybe not necessary since it can be disabled in the BP Plugin Settings)
    * Make “Notifications” the default (and only) subnav menu beneath Settings.

    NOTE: I can remove the Delete Account subnav menu with the following code (found in the BP forum also), but since General is the default subnav menu, it’s not so easy.

    `//Remove Settings->Notifications SubMenu
    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 );
    ?>`

    If someone can help me I’d really appreciate it. I need to remove the ability to update email and password (WP Users are created and managed from elsewhere). I also need to remove the ability for an end user to delete his/her account (I realize that this can be done from the BP options).

    Best regard,
    Mike.

Viewing 4 replies - 1 through 4 (of 4 total)
  • @wpmirwin

    Participant

    After finally learning how to search buddypress.org forums I found another partial solution that I decided to implement.

    It does not remove the General subnav menu. It’s an edit on the core BP files that removes the form data (actually, I replaced it with a link to another page where Profile mods can be done).

    I would still like to know how to do this without modifying core BP files.

    This is the URL to the forum topic:

    https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/hide-general-settings-tab/

    Mike.

    @megainfo

    Participant

    Hi @wpmirwin, this part of code above is from buddypress Notifcation manager plugin.
    https://wordpress.org/extend/plugins/buddypress-notifications-manager/
    mybe this plugin can help you.

    this function hide the notifications subnav, and it should work in bp 1.5 and bp 1.6

    function bp_hide_notifications_subnav(){
    global $bp;
    bp_core_remove_subnav_item($bp->settings->slug, ‘notifications’);

    if ( bp_use_wp_admin_bar() ) {
    add_action( ‘wp_before_admin_bar_render’, create_function(
    ”, ‘global $bp, $wp_admin_bar; $wp_admin_bar->remove_menu( “my-account-settings-notifications” );’ ) );
    }
    }

    //if is not bp 1.5
    if ( version_compare( BP_VERSION, ‘1.5’ ) < 0 )
    add_action( ‘wp’, ‘bp_hide_notifications_subnav’);
    else
    add_action( ‘bp_setup_nav’, ‘bp_hide_notifications_subnav’ );

    @wpmirwin

    Participant

    @meg@info

    Thanks for that. I am able to remove the notifications subnav, but since the General subnav is the default, it behaves a little differently.

    Anyway, the hack to modify the form data on the General subnav page is working well. I think I’m happy with it… and it’s not a big deal to re-apply after a BP upgrade.

    Thanks,
    Mike.

    @lwaterfo

    Participant

    Hello,
    Is there any update to this post? I am trying to remove the general subnav from my user profile page as well. I am using buddy press version 2.0.1

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove the General Settings in BuddyPress v1.6.1’ is closed to new replies.
Skip to toolbar