J.L.
My son had this problem as a baby. He'd go 5 days before having a bowel movement and he'd scream and it was bloody. When I took him to the doctor, they just told me to give him fiber and a laxative. That did not solve the problem. I stopped giving him wheat and it made a tremendous difference after a few weeks. It takes time for the bowel muscles to tighten back into the right shape. I even put a teaspoon of olive oil in baby food to help it go through faster. Then, a year later, it started up again. I couldn't figure it out, but now I've finally discovered he is also allergic to dairy. It was causing the same symptom, but now he will even throw-up if he has something with dairy in it. The health food store is great. For really good/quick mixes that are gluten free try kinnikinnick brands. For cookies Mi-Del Arrowroot are great. For noodles, Tinkyada Rice or Brown rice is excellent. You can even find all three on Amazon and order them in bulk. They are often almost a dollar cheaper than at the health food store. Good luck.
PS I even had my son tested for celiac disease, but it came back negative. It runs in our family, I even get the same symptoms, but it is difficult to diagnose. The best way to determine is to eliminate problem foods and see how he does. Just be sure to go 2 weeks before re-introducing that food. The scratch tests for other allergies can be effective, though, if you want to rule out other foods.