The first thing to teach your child to defecate in the pants you need to buy a pot. The modern market offers a huge selection of pots: and with comfortable ledges, and a high chair, with armrests, with back, and even music. Remember, it must be easy to use, stable and made of safe plastic.
Begin the process of weaning, give up diapers during the day and watch how often the bladder empties. Let the kid feels the discomfort of wet pants and gives you to understand that it should change. If after emptying the crumbs on doing his thing, and gives no value to it, put him and try to explain that pee and poop in the pants should not be.
In no case do not scold the child if he still wet his pants. Don't forget that mastering any skill requires your time.
Think of the gestures with which your kid could make you understand that he wants to use the toilet. Do not forget to introduce these gestures with everyone who takes part in the education of your child.
Keep in mind, much faster the baby gets used to a new skill if the pot has a specific place. As soon as you notice that the child went silent, changed facial expression or cling to the pants, bring him to the potty.
To toddler stopped writing in my pants, try to turn the pot daily in an unobtrusive game. Drop it twice within one hour. In this case, remember, don't force child to sit on the pot too long. Show the result and compliment.
If the kid immediately jumps to the pot, try to hold his weight over him. Or put on a doll and clearly show how she pisses on the pot, quietly pouring water into it. Then praise the doll to help the child understand what to write in your pants is not good.