Three Hofmann-like metal–organic frameworks {Fe(bpac)[Pt(CN)4]}·G (bpac = 1,2-bis(4-pyridyl)acetylene) were synthesized with photoisomerizable guest molecules (G = trans-azobenzene, trans-stilbene or cis-stilbene) and were characterized by elemental analysis, thermogravimetry and powder X-ray diffraction. The insertion of guest molecules and their conformation were inferred from Raman and FTIR spectra and from single-crystal X-ray diffraction and confronted with computational simulation. The magnetic and photomagnetic behaviors of the framework are significantly altered by the different guest molecules and different conformations. On the other hand, photoisomerization of the guest molecules becomes strongly hindered by the framework. [ABSTRACT FROM AUTHOR]