Zhangbi Castle is a compact fortified village south of Pingyao, with enough oddity and atmosphere to justify the trip after you have walked the old city walls. Above ground are narrow lanes, courtyards, shrines, and village architecture; below ground is the real surprise, a defensive tunnel system associated with early imperial military planning.
It works well as part of a day trip with the Wang Family Courtyard, especially if you want to see something less polished than Pingyao itself. The site is not as famous as Shuanglin Temple, but the mix of lived-in village fabric and hidden fortifications gives it a memorable texture.