You already got great advices.
When you take him out for potty don't play with him or distract him otherwise. Tell him to "go for poop" or "pee". Once he did his business praise him like crazy and give him a treat immediately.
Good luck, it takes time.
__________________ *I hope to be the kind of person my dog thinks I am* |