How old is your LO?
I think you are right on track. Both dairy and wheat are highly allergenic foods, and while might be tolerated in small amounts can often cause trouble if eaten too much. It's funny because they are common problem foods, and also foods that most of us tend to eat in large quantities every day!
With the dairy, some things like yogurt and cheese are often more easily tolerated because of how they are processed. The milk proteins are broken down during processing so they don't cause as many problems. Cow's milk on the other hand might be more troublesome and is often best avoided until closer to a year. Some LO's will tolerate it in cooking or in cereals, but for others it might still be too much for their sensitive tummies.
With the wheat, consider all gluten as well which is in other grains, not just wheat. Lots of people are gluten intolerant so it might be a good idea to avoid all of it.
Definitely stop both for a good few weeks I would say. Then what you can do is pick one of the two and try it out first. Wait and watch for the symptoms to return, then you should have a good idea of if it's an issue.
HTH
