From what you said his age is, he is still young and will get it. Here are a couple of high level suggestions:
1. Do not get upset with him or have this turn into a power struggle---it is not easy to do, but once the struggle is on----good luck.
2. When he does have an accident, have him change his own clothes---be prepared to have to clean up a little behind him, but it puts ALL the responsibility on him.
3. Relax, take a deep breath. Look for the successes and PRAISE him. He will get it. Number 1 and Number 2 are separate learning experiences. The sensations are different and so is the process. It is not a package deal.
4. If he was consistently going Number 2 and now won't, consider the following: have there been any new stresses at home/daycare, etc. Has there been any changes to his diet? Is he constipated---that can be a whole other problem if he starts to hold it?
I don't know if any of this helps. Feel free to email me if you have questions or just need support. I have potty trained more than my share of kiddos, so any tricks I can share I will. Hang in there.
K.