Once constipation has become chronic, it requires treatment for at least several months to a year. That's because large stools stretch out the lower colon and rectum which then stay stretched out even after stool has been passed. Sensing when you need to go happens because of signals from stretch receptors in the colon and rectum. Once the colon is stretched out, those don't work as well so the constipation continues to worsen. This cycle has to be broken and the colon/rectum will return to the correct size/shape over time but it can take up to a year.
My son's pediatric gastroenterologist prefers we use Miralax (polyethelene glycol or PEG).
It works by increasing the amount of water in the colon and by making the stool slippery so it moves through the intestines more easily and quickly.
It is safe to use multiple doses a day and for extended periods of time (a year for example). It is colorless, odorless and tasteless to the vast majority of people so you can mix it into plain water or juice and after 20 or 30 seconds you won't be able to tell it's there. My son has sensory issues and he says he can tell that the fluid has a tiny change in texture but otherwise no change.
If the Miralax causes mild diarrhea or leaking, decrease the dose a little and/or add a bulking agent like Benefiber (small amount) which will help absorb any excess fluid and stop the leaking.
Treatment of last resort is mineral oil. Miralax is much more appealing let me tell you.
Dietary changes are also very helpful in managing chronic constipation.
The simplest thing is to add specific fruits/juices to the diet and most kids will never know the reason why:
Apple, pear or apricot juice - 8 oz/day
Pears, cherries and apricots - raw or cooked
It's also helpful to avoid constipating foods:
applesauce
cheese
low/no fiber breads/grains
dried fruit
My son had severe problems with constipation as an early symptom of Crohn's Disease. This is an unusual presentation for Crohn's and his diagnosis was delayed for almost a year while his doctor insisted it was "just" constipation - even after he started having bloody stools. If your son's constipation continues for a long time or his growth is delayed or he starts having other symptoms like fatigue or blood in stools be sure to go back to his doctor for further investigation.