A control mechanism for stopping x-ray pulses in resonant nuclear media is investigated theoretically. We show that narrow-band x-ray pulses can be mapped and stored as nuclear coherence in a thin-film planar x-ray cavity with an embedded ^{57}Fe nuclear layer. The pulse is nearly resonant to the 14.4 keV Mössbauer transition in the ^{57}Fe nuclei. The role of the control field is played here by a hyperfine magnetic field which induces interference effects reminiscent of electromagnetically induced transparency. We show that, by switching off the control magnetic field, a narrow-band x-ray pulse can be completely stored in the cavity for approximately 100 ns. Additional manipulation of the external magnetic field can lead to both group velocity and phase control of the pulse in the x-ray cavity sample.