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 4 replies - 1 through 4 (of 4 total)

  • neijisly
    Participant

    @neijisly

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

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

    otty-dev
    Participant

    @ottiya

    Did this work for you? Having the same issue


    binaryfabric
    Participant

    @binaryfabric

    This worked for me, thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar