My son had the same symptoms you describe - He was 8. I scheduled an appointment with the Pediatrician (I adore her) and she wrote him prescriptions for about 6 different meds. She treated him agressively for stomach ulcers and an impaction in the intestines - basically, not enough fiber in his diet to completely digest the food and move it out through normal bowel movements. She put him on Miralax - which is now over the counter - it's colorless, tasteless - mix one scoop into a glass of water and drink every morning or evening. It is not a laxative - it is a bulk fiber additive which softens the poop and helps it move through the system. He was on Ranitadine (Zantac) for acid reflux - completely removed milk because we thought that might be the problem but it wasn't.
It took about a month to see signficiant changes but after being treated like that for about 60 days, my son did not cry after meals, complain about his stomach hurting, hold his stomach or refuse to eat.
I changed him to as many high fiber foods as I could find - whole wheat bread, yogurt for the good bacteria enzymes, wheat and oat based cereals with high fiber content. I aldo added more fresh fruits like apples with the skin on and oranges and bananas and fresh veggies. It helped to take him shopping and let him help pick out things he thought he would like to try.
The other thing is food allergies which would be treated completely differently than a bowel impaction - best to contact your pediatrician for a discussion.
Kids do have a difficult time trying to explain to us what hurts exactly where and what causes the hurt to intensify.
Good luck - those stomach issues are tricky. Stress can cause ulcers - even and especially in young children. Yelling, screaming, high expectations, forced food eating/cleaning up the plate. My husband is part of the "clean your plate club" and he just could never get it that small children eat small portions and they really are full faster than adults on tiny portions - kids are smart enough to stop eating when they are full - unlike us adults who eat for pleasure.