Pee - put the litter box the corner they like to pee the most. If right now they are doing it all over the place then you have to create the happy corner for them ^^ 2 easy (? hehe) methods I have learnt from friends that actually work, depending on how you keep them :
(1) if you keep them in cage and just bring them out only for floor time then they must have their fav corner(s) to pee on in the cage, put the litter box there with a bit of tissue or paper soaking wet with their pee... they will go where they smell it! BUT if you cannot pinpoint which corner it is then.. clean the whole cage & every items in it "
very very thoroughly", vinegar will help, pick one corner and put the litter box there with, again, tissue with peepee. They will learn.. hopefully ;-)
(2) if you let them run around in the room or even throughout the whole house then it will require a more drastic measure (haha). Well... if they have 1 or 2 fav spots in the house they like to pee then it's easy, you just put the litter box there. If not then you will have to keep them in a small to medium sized cage or small play pen (which will act as a litter box) with or without the litter box in it for approx 2 weeks. keep them in there
24/7. You will find that after the 2 weeks, they will recognise that the cage or the play pen is their rest room! They can run around all day and as soon as they want to pee, they will just hop right into the cage and do their business.
Poo - a different story. I have seen a few ppl being able to train their piggies where to poo. Very very few. I myself still don't know how to.
Hope this helps a bit

GOOD LUCK!