Thank you for your query,
Your child seems to have functional constipation
due to which he is passing sticky stone like stools.
Give more dietary fiber
rich food in his regular diet on daily basis.
Dietary fiber present in vegetables, fruits and green leafy vegetables.
Give plenty of oral fluids and water.
Ask him to sit in toilet for 10 minutes daily.
And you can give lactulose
syrup in prescribed dose daily till the stool becomes soft.
Hope I have answered your query.