Skip to:

Activity Stream – Remove specific activities

  • Bookkus


    I recently added achievements for buddypress and along with the regular activities they are really spamming up the system. It looks like nothing is happening, except a few unimportant things. I really want to remove:
    new users
    friend creation
    all achievements

    I am still an amateur, but really want to learn to do these things. If someone could guide me through the steps of how to find what to change and how I only choose specific attributes. I always have trouble finding the right functions to use. Any help in this direction would be great.

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

  • shanebp


    You can put this function in your theme functions.php or bp-custom.php

    It will prevent the creation of activity entries for the items in $exclude
    It will only do that going forward – it won’t remove existing entries.

    You need to find out what the activity type(s) is for achievements and add it to the exclude array.

    function dont_save_various_activities( $activity_object ) {
        $exclude = array( 'friendship_created', 'new_member' );
        if( in_array( $activity_object->type, $exclude ) )
            $activity_object->type = false;
    add_action('bp_activity_before_save', 'dont_save_various_activities', 1, 1 );

    You can read more on this great codex page by imath



    Thanks. I’ll give it a try.


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Activity Stream – Remove specific activities’ is closed to new replies.
Skip to toolbar