My grandson had the opposite problem at that age. He was very constipated and screamed everytime he had a bowel movement. The pediatrician told us to not give him cheese, more than 24 oz/day of milk, bread, pasta, bananas and applesauce because they were constipating. I'd try giving him all of those.
And for diarrhea stay away from fresh fruits, fruit juices, dried fruits such as raisins, whole wheat bread, graham crackers, beans, lentils.
Does he take formula or are you breast feeding? Lactose, which is found in milk, intolerance will cause diarrhea. I think the only way to find out if a baby is lactose interant is to take them off formulas that contain milk. My granddaughter had to have such a formula. She didn't tolerate those with soy either. I don't remember the name of her formula but it is in the same place at the grocery store as the "regular" formula.
After reading other responses I can add more info. My grandfather was a dairy farmer and my father passed on the suggestion of using Bag Balm for dry skin. I wonder if it's the same as Corona.
And a comment on putting vaseline on the diaper to keep it from absorbing the medicine. The vaseline will also keep the diaper from obsorbing urine.