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


    creative nomad
    Participant

    @creative-nomad

    Thank you. Where would I add this code?
    How would I also exclude profile photos and cover photos from showing up on the activity stream.


    Nahum
    Participant

    @nahummadrid

    Anyone might know why this won’t this also apply to the stream after selecting a filter tab like My Friends? Works on the main feed but not after selecting a tab?

    Choosing activity stream information

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