I need some help. please read and give your ideas.

D
I have a pretty stricken budget and I'd drop all the money in the world on my dogs if need be. But with the magic of the web maybe someone can help me! Maybe even give me ideas to try so here's the SHIT storm. 
My boy dog , rocky a little while ago started to get liquid poop. To the point he pooped in the house one or two times a day for a few days. I researched and started him on a new diet with rice. It got better and for the time we had the bag of dog food his poop was normal for a few weeks. With  with the rice diet I also gave him small meals from there on out with just dog food and that helped... I still  feed them 2-4 times a day still keeping portions to a cup each time. ( I have two puppies so a cup each and I have separated them now as well. ) My rocky and Panda have bad poops again. But not to the point where they can't hold it and just explode in the house like I said up too. The genes of the dad has a weak tummy and eats a specific kind of food cause of that reason. Panda didn't have any problem like Rocky until today as far as I know. I watch their POOP cause I'm so scared. 
Could it be in the yard ?
Maybe it's The kind of food? 
Stress possibly? I know that can cause it. But they have been such good dogs lately they haven't gotten into much trouble.