Constipated and miserable baby, please help!

Brionna
My 6 month old son has been pretty irregular lately. The doctor suggested baby food prunes, apples, pears or apple juice. I've also done warm baths, and the thermometer trick but nothing really seems to work long term. I'm not sure if it's something that he's eating that is binding him up all of the time, or if there are any other tricks. Anyone have any ideas? He's losing sleep and doesn't really want to eat his solids because of it 😩😭