Zombies are dumb. They will fall for nearly every kind of booby trap that the living can devise. You don't even have to hide a booby trap from a zombie. You don't even need to use explosives or firearms in Zombie killing traps. Large quantities of zombies can be stopped or killed using gravity and pit traps or falling rocks. Since they aren't conscious, thinking, beings, Zombies can't reason their way out of a simple trap or think ahead to avoid traps and obstacles. While they may follow the path of least resistance when they roam, Zombies in single-minded pursuit of humans can easily be led to fall into pits or impale themselves on spikes. This is a big advantage that humans have over zombies.
Impaling Trap. One easy way to stop Zombies is to arrange angled spikes in their path. People can easily navigate their way through a spike obstacle, but Zombies will move mindlessly forward and impale themselves on the spikes.
On The Walking Dead, the character Morgan Jones is initially driven beyond the edge of sanity by the loss of his family. For a time, he lives in a fortified area of a small down that is surrounded by impaling booby traps that regularly snag Zombies who wander into his living space.
Finally, in our modern society, wrought iron fences with spiked fence posts regularly impale drunken burglar-Americans who attempt to trespass. After a Zombie apocalypse, such fences will likely immobilize some portion of Zombies who attempt to get over them.