Consistency is crucial. This may mean taking time off work to be there to take the pup outside every 20-30 minutes when they are awake. Crate training will also help the 'penny drop' as it teaches the pup to hold on until taken outside. Then, be sure to stay with the pup in the yard so you are there to reinforce how clever they are when they do go in the right place.
It's not so much the dog doesn't listen, more that he doesn't understand what you want him to do. Go back to basics and don't punish him when he toilets indoors. Double your vigilance and take every opportunity to put him outside to toilet. The crucial thing is to be present when he does toilet in the correct place, so that you can reward him. This makes him keener to repeat the performance to get another treat. Conversely, if you have been telling him off for indoor accidents he may already feel inhibited about going to the toilet in your presence, including when he goes outdoors. This is one reason why it's important not to punish for inappropriate toileting.
I don't teach or recommend so-called "purely positive" methods that allow misbehaving pups to continue misbehaving, instead of teaching them which behaviors are and are not allowed. "Purely positive" is fine for teaching tricks and high-level competition exercises, but NOT for teaching the solid good behaviors that all family dogs need to know, and NOT for stopping behavior problems such as barking, jumping, chewing, nipping, chasing, etc.
Unless you plan to keep your dog outdoors--and few of us do because it's not recommended--you'll need to teach your dog where to eliminate. Therefore, house training (also called housebreaking or potty training) is one of the first things you need to work on with your dog. Crate training can be a very helpful part of the training process. This includes house training as well as many other areas of training:

You can use potty training pads to give a puppy a place to go inside. They are usually scented in order attract dogs to urinate on them. This can be an aid in potty training and may seem necessary depending on your situation. But, it can also cause some problems that may prolong the training period and make it more difficult. Using pads can confuse a puppy into thinking that it is OK to go inside.
With your dog sitting at your side, set off and give the command “heel” (so that your dog is aware you are about to move). If the dog gets ahead, stop and encourage it back to your side with a titbit. Repeat. To begin with, stop every three to four paces to praise your dog and give a titbit. Do not use your voice unless your dog is at your side. You can also practise this off-lead in a secure area – this makes you work really hard at keeping your dog with you, rather than relying on the lead.
You can use potty training pads to give a puppy a place to go inside. They are usually scented in order attract dogs to urinate on them. This can be an aid in potty training and may seem necessary depending on your situation. But, it can also cause some problems that may prolong the training period and make it more difficult. Using pads can confuse a puppy into thinking that it is OK to go inside.
Remember that training is an ongoing process. You will never be completely finished. It is important to keep working on obedience training throughout the life of your dog. People who learn a language at a young age but stop speaking that language may forget much of it as they grow older. The same goes for your dog: use it or lose it. Running through even the most basic tricks and commands will help them stay fresh in your dog's mind. Plus, it's a great way to spend time with your dog.
Just as a child needs a caring parent; an athletic team needs a coach; your puppy needs a leader and a clear social hierarchy. If you do not take up the role of leader, your dog will; and you will end up with an unruly, disobedient dog. Many people try to win their new puppy's love by letting the puppy always have its way. Buckets of affection is a wonderful thing for most puppies, but it must be tempered with respect.
There are several medical issues that can interfere with potty training. Dogs with a urinary tract infection (UTI) will urinate frequently in small amounts, and will not have much control. You may also notice excessive licking of their genital region. If you notice a change in the consistency of their stool, the cause could be a gastrointestinal issue. Some common causes in puppies are intestinal parasites, having eaten something not in their normal diet, or a sudden food change. If a food change is necessary, do it gradually over 5 to 7 days. If you suspect any of these issues could be a problem, you should consult with your veterinarian.[19] 

Dog training classes or private sessions can also be an addition to your own training program. The dog trainer can help you improve the program and customize it to your dog's learning style. Try to be as involved as possible when it comes to your dog's training. You and your dog will be a stronger team when you are directly involved in the training process.

Sometimes, despite all of your hard work, your puppy might slip up and eliminate in the house. If you catch him in the act, make an abrupt noise to stop him then quickly bring him outside and give him a reward for finishing in the right spot (it’s okay if you take him out and he doesn’t go). Don’t punish your dog for the accident; simply clean it up with an appropriate odor eliminator and vow to watch him more diligently in the future.
There also behavioral issues that can interfere with successful training. Urine marking is a normal dog behavior in which the animal will hike their leg and mark a certain area or object. With separation anxiety, the puppy may have accidents inside when you leave them at home alone. Some puppies become nervous or upset when their owners are away. Other puppies have a submissive or excitement urination problem. This causes them to spontaneously urinate during certain activities. Discuss these possibilities with your veterinarian or trainer if you're not getting positive results.[20]
Just as a child needs a caring parent; an athletic team needs a coach; your puppy needs a leader and a clear social hierarchy. If you do not take up the role of leader, your dog will; and you will end up with an unruly, disobedient dog. Many people try to win their new puppy's love by letting the puppy always have its way. Buckets of affection is a wonderful thing for most puppies, but it must be tempered with respect.
Just as a child needs a caring parent; an athletic team needs a coach; your puppy needs a leader and a clear social hierarchy. If you do not take up the role of leader, your dog will; and you will end up with an unruly, disobedient dog. Many people try to win their new puppy's love by letting the puppy always have its way. Buckets of affection is a wonderful thing for most puppies, but it must be tempered with respect.
Submissive urination is a normal way for your puppy to demonstrate submissive behavior. Even a dog that is otherwise housetrained may leave dribbles and puddles of urine at your feet when greeting you. Excitement urination with a puppy is usually caused by lack of bladder control. The puppy is not aware that he is urinating; he's just excited and any punishment will only confuse him.
Many owners appear disappointed that their young puppy will not toilet when out on a walk, yet relieves itself the second it gets back home. This is because the puppy has been taught to toilet only at home (hopefully in its garden), and being creatures of habit, they often wait until they have returned home before evacuating their bladder and/ or bowels.
While indoor elimination solutions like potty pads and litter boxes have their place, using them can actually slow the process down if you plan to eventually have your dog eliminate exclusively outside. Teaching your puppy to potty inside sometimes and outside others can be confusing because you will eventually have to teach your dog that at some point the indoor option is no longer allowed. Potty pads work best for people who can’t get their puppy outside quickly, like those who live in high-rise apartments or have limited mobility.
I don't teach or recommend so-called "purely positive" methods that allow misbehaving pups to continue misbehaving, instead of teaching them which behaviors are and are not allowed. "Purely positive" is fine for teaching tricks and high-level competition exercises, but NOT for teaching the solid good behaviors that all family dogs need to know, and NOT for stopping behavior problems such as barking, jumping, chewing, nipping, chasing, etc.
Dogs thrive on a predictable schedule, and setting one up for your new puppy will make life easier for both of you. Feed your puppy at the same times each day to help you predict and schedule bathroom breaks. Schedule post-meal walks, as well as hourly trips outside during the initial stages of potty training. Always take your puppy out after crating, even if was only for a short time, and remember that vigorous play should always be interrupted for potty breaks.
×