Learning and training
It seems that guinea pigs learn mostly through repetition and association of cause-and-effect (which can also be thought of as classical conditioning, in psychological terminology). In particular, as with many animals, their zeal for learning is greatest when food is involved. All of this makes the guinea pig very trainable; they can learn to use a litter pan when outside the cage, and even come when their name is called. It takes a great deal of patience, and several sessions with your pet, but the potential is there.
To potty-train them, it's best to start by taking them out of the cage for only a few minutes at a time and letting them run around on the ground. Put them back in there cage, and wait for them to pee. After they do this, bring them back out. If you see your guinea pig get anxious on the floor, back into corners or perform other pre-toilet activities, put them back in their cage, and then reward them with a treat after they pee before letting them back out again. Eventually, they will get the idea that the cage is for peeing and the carpet is for playing.
Most guinea pigs learn quickly that the cage is a safe place, and as a general rule, they will litter in familiar territory. This does make potty training easier, provided you never let them establish a litter spot somewhere on the carpet in the corner of your room. If you opt to let them roam the house, or part of it, at will, it is inevitable that you will have a few accidents. Some well-placed litter pans can reduce, if not eliminate all of these.
Guinea pig poops, however, are harder to control, as they not only drop them at seemingly random times, but they also eat special, moist poops that are stored in a small sack inside their anus. These poops are essential to their health, but can be frustrating to owners, as they have no qualms about stopping whatever they are doing, wherever they happen to be, to reach down and eat a poop. And in doing so, they may eat half, and drop the rest where they are standing, which might very well be in the middle of your carpet.
Attention: NOTHING on this site may be reproduced in any fashion whatsoever without explicit consent (in writing) of the owner of said material, unless otherwise stated on the page where the content originated. Search engines are free to index and cache our content. Users who post their account names or personal information in their questions have no expectation of privacy beyond that point for anything they disclose. Questions are otherwise considered anonymous to the general public.