I’ve come to an interesting scenario where I need to organize a large amount of posts by year. The aim would be to organize the posts like this:
Current year x
Newest post in year x
Older post in year x
Last year y
Newest post in year y
Older post in year y
Anyone have any ideas how to go about doing this? I thought something along the lines of creating an array by finding all posts within a year and wrapping that in a foreach function but I’m not quite sure how do go about doing that.