You can take the following method, so that dogs no longer eat feces.
1、To the dogs lack of biological elements: You can buy medicines containing composite elements and minerals from local pet hospital,feed your dog by his weight. In addition, try to get your dog into the habit of eatting dog food. Even if your dog was used to eat human food, you should try to change his habit. For example, you can mix few dog food into his food at first and increase dog food mixed into gradually.
2、To the dogs with bad habit of eating feces:
(1) Dogs usually defecate after 1 to 2 hours when he finish his meal, so you must pay more attention on your dog at the time, clean up it if he defecates. If so, your dog can't find feces to eat when he's hungry.
(2) If you find that your dog is eating feces, deter him at once and criticize him severely, let him know he is doing a bad thing. However, you must do that when he is eating feces, if you criticize him when he just finish defecating or he is walking towards feces, which will give rise to misunderstanding, your dog may mistakenly think defecating is wrong, so he will be inclined to eat his feces to prevent you from finding his feces.
(3) Sprinkle the feces with an yucky taste, such as pepper.
(4) Mix something in dog's food, so that his feces has a kind of smell taste that dog dislike, such as garlic (onion is not allowed, it's deleterious to dogs)
(5) There is a saying that dogs eat feces because feces contains indigested nutrient, so you can feed dogs peptic drug to stop him from eating feces.
Anyhow, in my opinion, you must clean up feces in time, it's best way to stop dog from eating feces, if you persevere in that, your dog will
get out of the bad habit soon.