1. Unless otherwise provided by state law:

 a. If notice of an election, hearing, or other official action is required by the city code, the notice must be published at least once, not less than four nor more than twenty days before the date of the election, hearing, or other action.
 b. A publication required by the city code must be in a newspaper published at least once weekly and having general circulation in the city. However, if the city has a population of two hundred or less, or in the case of ordinances and amendments to be published in a city in which no newspaper is published, a publication may be made by posting in three public places in the city which have been permanently designated by ordinance.
 2. In the case of notices of elections, a city with a population of two hundred or less meets the publication requirement of this section by posting notices of elections in three public places which have been designated by ordinance.