Help i cant get my four year old to poop

As

My four year old has been dealing with stomach pains like he had to use the bathroom, but when he goes it just looks like spit in the toilet. Kind slimy, foamy, bubbly clear stuff. No color at all. I thought it could be a reaction to a certain food but idk which one. I’ve tried taking him off a few different kind. I thought maybe he had IBS. I’m not sure. Anyone else dealt with this?? Btw its a struggle to get him to eat anything decent. I literally have starve him out to get him to eat chicken nuggets and ramen noodles. He’ll want to eat Doritos, snack bars, slim Jim’s...like junk food. And I struggle because my husband doesn’t believe me or even try to help me to get him to eat something good. He rarely eats a few bites of steak. I cook meat at home all the time too. He won’t eat Mac n cheese, potatoes. Nothing. Idk what to do....anyone have ideas??