This helped me but yorkies are tough to train.
I got a belt that I could hook my leash to leaving the dog a little room but not much. Everywhere I went he had to go and if he oopsed I caught it right then. Scolded wiped or picked it up with paper towel took it and dog outside and wiped it where I wanted him to go and told him Good dog.
Hope it helps |