Skip to:
Content
Pages
Categories
Search
Top
Bottom

Choosing activity stream information


  • creative nomad
    Participant

    @creative-nomad

    I would like to pick and choose what is shown in the activity stream. Ideally, I want to not show friendships made and blog posts posted. Is there a way to specify not to show these things

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

  • Boone Gorges
    Keymaster

    @boonebgorges

    Yes, this can be done in code. You’ll need two filters. One removes the unwanted items from the dropdown on the activity page, and the other removes them from the activity stream itself.

    
    add_filter( 'bp_get_activity_show_filters_options', function( $filters ) {
    	unset( $filters['friendship_accepted,friendship_created'] );
    	unset( $filters['new_blog_post'] );
    	unset( $filters['new_blog_comment'] );
    	return $filters;
    } );
    
    add_filter( 'bp_before_has_activities_parse_args', function( $args ) {
    	$filter_query = array(
    		array(
    			'column' => 'type',
    			'value' => array( 'friendship_accepted', 'friendship_created', 'new_blog_post', 'new_blog_comment' ),
    			'compare' => 'NOT IN',
    		),
    	);
    
    	$args['filter_query'] = $filter_query;
    	return $args;
    } );
    

    nomad365
    Participant

    @nomad365

    I too are in this vote but also i would like for profile updates, change their profile pictures to not show up on the sites activity feed. I have tried the code above but it does not appear to do nothing after adding to the child themes function.php. Please help very much appreciated.
    Sorry it does remove the friendships made and blog posts from the drop down but not from the activity streams.

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