This topic has 4 replies, 2 voices, and was last updated 7 years by fullworksmedia.

  • Author
  • #168998
     fullworksmedia
    Participant

    Hi there,

    I spent hours trying to figure out how to exclude from the site-wide activity things like ‘user uploaded new avatar’, ‘user created new group’ etc.

    Any ideas how to do that?

    Many thanks,

    Adam

    #169030
     Kieran_SQ
    Moderator

    Hi @fullworksmedia,

    Have you tried the BuddyPress Activity Filters plugin https://wordpress.org/plugins/bp-activity-filter/#description?

    Thanks,

    Kieran

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.

    #169047
     fullworksmedia
    Participant

    Hi Kieran,
    Thanks for your reply. I’ve checked this plugin before but unfortunately it doesn’t solve the problem.
    I can hide some activities from the dropdown but I’d like to be able to remove these activities completely from the loop and not just hide because when I go to ‘everything’ in the filter it still shows things like ie ‘xxx changed their profile picture’ or ‘Anne profile was updated’. The idea is to remove these from the activity loop completely.

    Any ideas?

    #169050
     Kieran_SQ
    Moderator

    Hi,

    If you’d like to do this manually please follow this post by Sarah Gooding at WPMUdev.org https://premium.wpmudev.org/blog/how-to-customize-the-buddypress-activity-loop/.

    Thanks,

    Kieran.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.

    #169139
     fullworksmedia
    Participant

    That’s what I needed 🙂 Fixed now in case anyone needs this code.

    // budypress activity stream – remove some activities
    function buddypress_dont_save_some_activity( $activity_object ) {

    $exclude = array( ‘new_avatar’, ‘updated_profile’, ‘friendship_created’, ‘joined_group’, ‘created_group’ );

    if( in_array( $activity_object->type, $exclude ) )
    $activity_object->type = false;

    }
    add_action( ‘bp_activity_before_save’, ‘buddypress_dont_save_some_activity’, 1, 15 );

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘Bugs & Issues’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?