Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

When a member post to a group it shows up in the activity feed under “username posted an update in the group” then its followed by the group avatar then the group name. So I was wonder how I could remove the group avatar from the activity action. Is their anything I could add to the functions.php or bp-customs.php? I would rather not try hiding it through css.

share|improve this question

closed as off-topic by Pieter Goosen, kaiser Aug 4 at 16:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

Add this to your child theme's functions.php.

 function bp_dtheme_activity_secondary_avatars( $action, $activity ) {
    if ( $activity->component = 'friends' ) {
    // Only insert avatar if one exists
    if ( $secondary_avatar = bp_get_activity_secondary_avatar() ) {
    $reverse_content = strrev( $action );
    $position = strpos( $reverse_content, 'a<' );
    $action = substr_replace( $action, $secondary_avatar, -$position - );
}
 break;
 }

 return $action;
 }
 add_filter( 'bp_get_activity_action_pre_meta', 'bp_dtheme_activity_secondary_avatars', 10, 2 );

And it will override bp default's and only show the secondary avatar when the activity is a friends update (eg. Bob became friends with Joe.)

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.