Skip to:
Content
Pages
Categories
Search
Top
Bottom

Get rid of Activity Tab on Member Profile


  • Pete Hudson
    Participant

    @pete-hudson

    Hi guys,

    Can anyone tell me how to get rid of the Member “Activity” stream tab on the Member’s profile?

    We have website members who should not have access to the BP Activity feed, but they have member profiles and the Activity tab which allows them to post to the main activity stream.

    Thanks,
    Pete

Viewing 2 replies - 1 through 2 (of 2 total)

  • neijisly
    Participant

    @neijisly

    Want you hide it or move it and put “profile” instead?


    Paul Barthmaier
    Participant

    @pbarthmaier

    I think you’ll want something like this:

    add_action( 'bp_actions', 'remove_members_activity_tab', 5 );
    function remove_members_activity_tab() {
    	global $bp;
    	bp_core_remove_nav_item( 'activity' );
    }

    which should remove the tab, but it’ll also remove the whole navigation if Activity is set as the default. To make sure that doesn’t happen, add this:

    add_action( 'bp_setup_nav', 'change_settings_subnav', 5 );
    function change_settings_subnav() {
    	$args = array(
    		'parent_slug' => 'settings',
    		'screen_function' => 'bp_core_screen_notification_settings',
    		'subnav_slug' => 'notifications'
    	);
    
    	bp_core_new_nav_default( $args );
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar