I rescued a 1 year old shih tzu mix female and she won't pee in my yard on a leash, only in a field off the leash.
How can I train her to pee in my yard on the leash?
Hi At 7 months old your pup has already gained some well-established habits, and it's going to take a lot of time, patience and consistency to re-train her. She's doing what she's always been shown is the right thing and it's important not to scold her or get angry as that will confuse and frighten her, making the situation worse.
Try taking it a step at a time if possible, perhaps by allowing her to be off-leash in your yard at first. Dogs are creatures of habit, and once a behavior has become 'second nature' to them, they don't even think about what they're doing. It's a reflexive action now which is why it takes time and effort to help her to 'forget' that old habit and adopt the new one.
If you could allow her to be off-leash in your yard then she is more likely to 'perform' when she needs to go and once she starts to get her own scent and becomes familiar with eliminating in your yard you'll have taken a big step forward. When she is comfortable with that, you can then add the on-leash component. If you don't have a fenced yard, perhaps you could try setting up a dog exercise pen (there are some great portable ones) and putting her in there when she needs a potty break. That way she'd be contained and free at the same time!
Also, use the crate while she's getting the hang of all this. If she doesn't pee or poop when you take her out, put her in her crate and take her out again after 30 mins or so, continue this way until she goes. Only then does she get free access to the rest of the house. That way you can pretty well eliminate the opportunity for her to make a mistake indoors and get things even more confused.