Reactions of N‐(2,4‐dinitrophenyl)pyridinium chloride (salt(Cl)) with H+MCl4−1 (M ≡ Fe and Bi) resulted in an anion exchange between Cl− and MCl4− to yield Zincke salts with metal chloride anions, namely salt(Fe) and salt(Bi), respectively. Reactions of the Zincke salts with piperazine resulted in ring‐opening of the pyridinium ring, yielding ionic polymers with 5‐piperazinium‐2,4‐dienylideneammonium metal chloride units, namely polymer(Fe) and polymer(Bi). The corresponding model compounds were synthesized via reactions using salt(Bi) or salt(Cl) as starting materials. The UV–visible spectra of the polymers had absorption maxima at longer wavelengths than those of the model compounds. This indicated that the π‐conjugation system is expanded along the polymer main chain. Superconducting quantum interference device measurements indicated that polymer(Fe) was paramagnetic. Cyclic voltammetry analysis suggested that the polymers underwent electrochemical oxidation. © 2019 Society of Chemical Industry