Nearly every town in china has a city god or Ch'eng-huang. The belief in such a protector god preceeds Taoism but the idea was eagerly taken up by Taoist theology. The city gods are protecting the town or village and its inhabitants. During droughts they brought rain, they let the sun come out again after storms and heavy rains, they protected the crop, regulated birth, and, and, and..
The city god temple of Xi'an was built in 1387 (Ming dynasty) and was one of the largest city god temples of its time. It was also called the Capital City God temple, because the city god of Xi'an ruled over the city gods in northwestern China.
In 1966 the Red guards stormed the temple and turned the temple area into a flea market. Although the temple re-opened in 2004, there are still a lot of stalls and little shops in and around the temple. Since it was neglected during these nearly 40 years, it has an air of decay and eerie beauty about it, which actually is something very positive in this case. A bit like a haunted ghost town, you feel the burden of years and you can only imagine how splendid it must have been 600 years ago.
The intricate wooden carvings are still astonishing to look at.
I found it to be one of the most beautiful temples in Xi'an. Another day I utterly enjoyed.