went through that with my son @age 2-3. Does your child have bouts of constipation. If so, deal with that first, they sometimes will try to go in the diaper or pull up because they can do it when they are TRULY ready. If no constipation, try this. get a small bookholder(crate, small craft box, etc) and fill it with his favorite books. Allow him to sit on the potty or toilet with his books and see if he will eventually go. you've got to kind of monitor the signs he displays prior to going no2 so you will know when to sit him in there. This should help, if not books, anything else that he enjoys that can be held in his hands. Lastly, if he is in pull ups, I would put him in regular cotton trainers. It might create a little more work for you in the beginning but in the long run, it will help.
HOpe this helps
D. Tate