Ammonites of all sorts were teeming in the oceans for about 340 million years, from the Early Devonian to the end of the Cretaceous. As dinosaurs they became extinct at the end of the Cretaceous (65.5 million years ago). This timing is coincident with an abrupt decline in several groups of plankton. The collapse of the marine food web at that time apparently contributed to the extinction of Baculites and similar ammonites, which depended on plankton as a food source. Other ammonites, however, also became extinct simultaneously. A plausible hypothesis for the terminal extinction of ammonites is related to their early life history. Newly hatched Mesozoic (from about 250 million years ago to about 65 million years ago, also referred to as the Age of Dinosaurs) ammonites had shells that ranged in size from 0.5 to 1.8 mm, which suggests that ammonites laid a large number of small eggs and that newly hatched juveniles ate small plankton. The abrupt decline of plankton at the end of the Cretaceous would thus have greatly affected the survival prospects of newly hatched ammonites.
Another aspect is that the radiation of certain forms of ammonites might be associated with the radiation of plankton during the Early Jurassic.
Unlike the probably better known “coiled” ammonites, Baculites ("walking stick rock") had a nearly straight shell.
Kruta, et al.
The Role of Ammonites in the Mesozoic Marine Food Web Revealed by Jaw Preservation
Science 331, 70 (2011)