You can give the toddler a bit of Pepto Bismol but don't give them as much as you would an older child or adult.
You can also place the toddler on a bland diet such as Bananas, Apple Sauce, Yogurt etc.
Then make sure the toddler gets plenty of fluids such as fruit juice, water etc to stay hydrated and other than that you just need to have the toddler rest as much as possible and within a week or so the toddlers stomach ache should be gone.
If the toddler still has a stomach ache then something else could be wrong and you should take the toddler to the doctor.
If the toddler doesn't feel like eating then don't force them to eat as they will eventually eat when they feel better.
Just make sure the toddler is getting plenty of fluids and rest and they should be feeling better soon.
You can also buy some stomach relief medicine at Walmart or other stores for toddlers so make sure you get the medicine made for toddlers because adults and toddlers systems are different and need different dosages of medicine.