Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Display Settings options to admin only

  • Hi,
    there is an option in buddypress which allow users to modify their profile and notification settings… If we disable that feature it will remove the “Settings” tab from the nav… And all the member (including admin) will not be able to view settings tab…
    I want settings tab to be viewable to the admin only and not the members, which means i have to write some conditional tag around the settings tab option…
    How can i do that??? Anyone have any idea??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Just add an the following IF Statement

    
    if (current_user_can('level_10')){
    
    } 

    Add the above if condition around the following code in wp-content/plugins/buddypress/bp-settings/bp-settings-loader.php

    
    $main_nav = array(
    'name'                    => __( 'Settings', 'buddypress' ),
    'slug'                    => $this->slug,
    'position'                => 100,
    'show_for_displayed_user' => bp_core_can_edit_settings(),
    'screen_function'         => 'bp_core_screen_general_settings',
    'default_subnav_slug'     => 'general'
    );
    
    

    Amazing!
    That worked :)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Display Settings options to admin only’ is closed to new replies.