Could be Celiac, other food sensitivities/allergies (often diagnosed as "IBS" by uninquisitive MD's), a motility problem in her rectum (pelvic floor dysfunction), behavioral constipation, or something else. A blood screening test can be done for Celiac, and if any of the anti-gliadin antibodies are elevated, then a biopsy of her small intestine will usually confirm the diagnosis if it is Celiac. Stool tests can be done to check for parasites, digestive enzyme levels, inflammation, food sensitivities, non-Celiac gluten sensitivity, etc. Alternatively, a gluten free diet could be tried for a few weeks to see what happens.
If you suspect lactose intolerance, Lactaid Milk or Lactaid enzyme supplement taken whenever something containing dairy products may help. Cheese and yogurt are lowest in lactose because the fermentation process consumes the lactose.
Dairy protein intolerance can sometimes also cause constipation. And cheese in general tends to be constipating. Yogurt is a less-constipating alternative to cheese and contains good bacteria that the GI tract needs for good health. Probiotic supplements may also be needed...especially if she has ever been on antibiotics.
Also, make sure she is getting enough fluids (highly sugared drinks and artificially sweetened sodas/drinks are not helpful as fluid intake) and exercise to stimulate and ease the passage of stool.
I've also found sometimes that glycerine suppositories sometimes help...
Ground flaxseed meal added to breakfast cereals and sprinkled over cooked vegetables may also be helpful...start with small amounts to help the body adjust to the increase in fiber.
For behavioral constipation, a set regimen of spending 1-2 specific time(s) of the day sitting on the potty for 5 minutes at a time to help retrain the body to "go" at those times. Best times to choose are right after a specific meal of the day (such as right after breakfast, and/or right after dinner), because the body is already stimulated to move things through the bowels due to the effects of eating/food in the system.
I hope this helps - take care,
Chronic Lyme Disease, Chronic Bartonella (clinical dx only), Gluten & Sulfite Sensitivity, Many Food/Inhalant/Medication/Chemical Allergies & Intolerances, Asthma, Gut issues (dysmotility, non-specific inflammation), UCTD ("Secondary Lupus-Like Syndrome"), Osteoporosis, chronic Lymphopenia, etc.; G-Tube; Currently trying to wean off TPN.
Meds: Pulmicort, IV Ceftazidime, Heparin (to flush PICC line), Claritin, Domperidone, Colloidal Silver (used topically), probiotics, Milk Thistle, Ailanthus, homeopathy.