Once your guinea pig is out of the hospital and back at home, it is important to maintain the treatment protocol regimented by your veterinarian.
Good hygiene is very important. Your guinea pig will be predisposed to severe skin infections while they are having diarrhea or loose stools and it important to keep their rear ends clean.
Keeping them on a basic or bland diet (only fresh hay and small amounts of pellets with no treats) will help stabilize their gastrointestinal flora while it is reestablishing itself.
Make sure you are seeing a veterinarian who is familiar with guinea pigs and will administer the "safer" antibiotics when they are required.
Probiotics can be given orally at the same time as the antibiotic regiment. Live culture yogurt works well and many guinea pigs will eat it like a treat. There are also commercial lactobacillus supplements that could be used.
While on antibiotics, avoid any sudden changes in your guinea pig's diet. Any changes can disrupt their normal gastrointestinal flora.