BuddyBoss Home – Web Support Forums Themes OneSocial theme Code to remove certain activity types from activity feed

Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Question

    #62479
    @costyclan

    I want to amend my activity feed and have added the code from this link;
    https://gist.github.com/slaFFik/044cb43c0871e48cf341

    I also want to remove ‘new groups' and ‘group memberships' do you know the code to add to do this please?

    Answers

    #63884
    @vapvarun

    Hi @costyclan

    
    function bp_activity_dont_save( $activity_object ) {
        $exclude = array(
            'updated_profile',
            'new_member',
            'new_avatar',
            'friendship_created',
            'joined_group'
        );
        // if the activity type is empty, it stops BuddyPress BP_Activity_Activity::save() function
        if( in_array( $activity_object->type, $exclude ) ) {
            $activity_object->type = false;    
        }
    }
    add_action('bp_activity_before_save', 'bp_activity_dont_save', 10, 1 );
    

    You can add those codes inside child theme functions.php

    Regards
    Varun Dubey

    #64946
    @costyclan

    @vapvarun can I remove this drop down filter entirely?

    #64947
    @costyclan

    I'd also like to remove the sort drop down from members page (see attached).

    #64991

    Deepak BuddyBoss
    Participant
    @deepak

    Hi @costyclan,

    You can add following css line of code in style.css of your child theme. Or go to Dashborad -> BuddyBoss -> OneSocial Theme -> Custom Codes -> CSS and paste it.

    #buddypress #members-directory-form #members-order-select {
        display: none;
    }

    Hope this helps you.

    Thanks

    #65950
    @costyclan

    thank you @sagar
    Could you also please provide code to remove drop down from ativity feed on users ‘Wall'
    (see attached)

    #65955

    Anonymous
    @

    Hi @costyclan,

    Please can add following css:

    
    #activity-filter-select.last {
    display: none !important;
    }
    

    Regards

    #66152
    @costyclan

    thank you @pallavi

Viewing 8 posts - 1 through 8 (of 8 total)
  • The question ‘Code to remove certain activity types from activity feed’ is closed to new replies.