Let's say I have 4 entry types (Article, Video, Photo & Quote). What's the best way to list the latest 5 entries by each entry type?
craft.entries() fetches entries.
To fetch the entries with a given entry type, you use type. So to get the Article entries, either
To fetch the latest 5, you want the entries sorted by postDate, descending (this is the default sort order), and then limit that to 5. Combining with the entry type, you have:
And you have four entry types, so might as well loop over those: