function my_default_get_group_avatar($avatar) { global $bp, $groups_template; if( strpos($avatar,'group-avatars') ) { return $avatar; } else { $custom_avatar = 'YOUR LINK TO YOUR AVATAR HERE'; if($bp->current_action == "" || $bp->current_action == "my-groups" || $bp->current_action == "invites" ) { if ( $bp->current_component == BP_FORUMS_SLUG ) { $width = "20"; $height = "20"; } else { $width = BP_AVATAR_THUMB_WIDTH; $height = BP_AVATAR_THUMB_HEIGHT; } return ''; } else return '' . attribute_escape( $groups_template->group->name ) . ''; } } add_filter( 'bp_get_group_avatar', 'my_default_get_group_avatar'); add_filter( 'bp_get_the_topic_object_avatar', 'my_default_get_group_avatar');