Costs, if any, in an action against a city, village or town officer in his or her official capacity, except an action directly involving the title to the office, and except as provided in s. 814.25, shall not be awarded against that officer, but may be awarded against the city, village or town.
Wis. Stat. § 814.24