To encourage eating - try small amounts of favourite foods, try to give them during cuddles if the food will be taken away by another piggie before the one who is unwell gets a good chance at deciding to eat it, take away any unwanted food and try again with fresh later as an unhappy tummy can need time to settle between attempts to eat, try giving recovery type food made up as a warm soup in a shallow dish in front of their nose as the vegetable smell will stimulate appetite (not hot!), avoid strong herbs even though some of these say they stimulate appetite as new strong herbs can upset unhappy tummys, try cutting into broccolli stem or tearing apart grasses or lettuce - ie strong vegetable smells next to the cage a few minutes before attempting to feed a small portion as the desire to eat can take time to emerge in an upset tummy.
Finally - keep a careful eye on fluid intake as piggies can lose out on fluids by not eating as much wet vegetables as usual. Avoid natural diuretics like cucumber skin as these will encourage the piggie's body to lose water.
Best of luck, Sarah