There's a children's probiotic called Florastor and it helps their digestive system get back to normal and constipation stops. But ask your pediatrician before using. Our pediatrician recommended we use it if our daughter ever got constipated or had diarrhea it. It helped a lot and we didn't have to pump her with sugary juices.
Pear juice always worked for my son. I mixed one ounce of juice with one ounce of water. My doc also had me take their temp rectally and that helped too.