Please have Coconut checked by a vet for a bladder issue, which can range from a urine infection (UTI) to an inflammation of the bladder walls (cystitis) to bladder stones or sludge. They all present with very similar symptoms; painful peeing and pooing being one of them.
Please make sure that coconut has plenty to drink (if necessary syringe her as much water as she will take in one go once daily) to help flush the bladder. You can also offer watery and mildly diuretic veg like cucumber, chopped celery or lettuce, but not so much as to cause diarrhea. You can also up the vitamin C intake.
Please ask for a painkiller/anti-inflammatory (metacam) as well as an antibiotic (bactrim/septrin is the most effective, but it is not licensed for guinea pigs) to help alleviate the symptoms, so your vet may prefer to give baytril. Ask for a 2-3 weeks course to make sure that it is gone and to prevent a return; bladder infections can be very tenacious. The metacam will help especially if you are dealing with a cystitis rather than urine infection, but it is going to contribute to making Coco feel much more comfortable while the acute symptoms last.
If there is any indication for a potential stone or a build-up of sludge in the bladder, have an x-ray with only very light sedation done. Because guinea pigs have a naturally alcaline urine, they are as a species rather prone to urinary tract problems.
Wishing you all the best! Please keep us updated!