Except as otherwise provided, all candidates for mayor and councilmen, or any of them, to be voted for at any general or special municipal election, shall be nominated by party primary election, and no other name or names shall be placed on the official ballot at such general or special election than those selected in the manner prescribed herein. Such primary election or elections, shall be held not less than ten, nor more than thirty days, preceding the general or special election, and such primary election or elections shall be held and conducted in the manner as near as may be as is provided by law for state and county primary elections.