# Theme with archive of posts organized chronologically

**URL:** <https://forum.ghost.org/t/theme-with-archive-of-posts-organized-chronologically/20576>\
**Category:** Developer help\
**Created:** [March 5, 2021, 7:33pm UTC](https://forum.ghost.org/t/theme-with-archive-of-posts-organized-chronologically/20576 "2021-03-05T19:33:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lorcand](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/lorcand/32/11466_2.png) [@lorcand](https://forum.ghost.org/u/lorcand)\
**Post date:** [March 5, 2021, 7:33pm UTC](https://forum.ghost.org/t/theme-with-archive-of-posts-organized-chronologically/20576/1 "2021-03-05T19:33:09Z")

</div>

I would be grateful if anybody could point me towards a theme which includes an archive of posts organized chronologically … (posts from 2021, 2020, 2019, 2018, … ).

Here is an example of what I mean …

[Archives - Lorcan Dempsey’s Weblog (oclc.org)](https://blog.oclc.org/lorcand/post-archives/)

Update: I see that this has been discussed and addressed before here.

> [@Monthly Archive Index Pages](https://forum.ghost.org/t/monthly-archive-index-pages/12110):
>
> Hi. I’m relatively new to Ghost—I’m working on my second site with it, and my second custom theme—and I’ve run into a dead end. (I’m prototyping the site on Glitch using Ghost 3.0.0) I want to have an archive index page with no individual entries, but rather a list of months/years, i.e. “January 2020”. Following a month link would then bring you to a page containing all the posts for that month. I’m having trouble figuring out how to do either of these things. There doesn’t seem to be a way to…

Although what is proposed still lists all the entries, rather than just a series of links to years or months.

---

<div class="post-metadata">

**Author:** ![Hannah](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/hannah/32/22_2.png) [@Hannah](https://forum.ghost.org/u/Hannah)\
**Post date:** [March 5, 2021, 7:35pm UTC](https://forum.ghost.org/t/theme-with-archive-of-posts-organized-chronologically/20576/2 "2021-03-05T19:35:20Z")

</div>

Please see this answer:

> [@Sorting posts by date (chronological)](https://forum.ghost.org/t/sorting-posts-by-date-chronological/20017/2):
>
> This is totally doable in Ghost and unless you want to design the pages differently, it doesn’t require theme changes - it needs a routing configuration. The dynamic routing guide explains how to use routing to build pages that list content in different ways:

---

<div class="post-metadata">

**Author:** ![lorcand](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/lorcand/32/11466_2.png) [@lorcand](https://forum.ghost.org/u/lorcand)\
**Post date:** [March 5, 2021, 7:48pm UTC](https://forum.ghost.org/t/theme-with-archive-of-posts-organized-chronologically/20576/3 "2021-03-05T19:48:50Z")

</div>

I am thinking of something like this …  
[Archives - Lorcan Dempsey’s Weblog (oclc.org)](https://blog.oclc.org/lorcand/post-archives/)

The reason for wondering about a theme is to see how people approached it.

Not currently at a knowledge level that would mean I could easily figure it out from scratch. Thanks.

---

<div class="post-metadata">

**Author:** ![markstos](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/markstos/32/18182_2.png) [@markstos](https://forum.ghost.org/u/markstos)\
**Post date:** [June 30, 2022, 5:26pm UTC](https://forum.ghost.org/t/theme-with-archive-of-posts-organized-chronologically/20576/4 "2022-06-30T17:26:31Z")

</div>

I don’t think there’s an easy way to do this with Ghost. There’s some newer discussion with some example SQL to get a list of months or years that contain posts and the count for each month. What’s missing is connecting the result that query with the frontend templates:

> [@Filter Posts by Date Block](https://forum.ghost.org/t/filter-posts-by-date-block/31067/8):
>
> The solution by @denvergeeks would work, but involves selecting the details of every post from the database, sending a lot of data to the frontend that will be discarded, and then having the browser process every post to come up with the result. Here’s example of what it looks like to query this data directly using SQL. I’ve provided an example of querying the by-month counts and also by-year counts. You can see the report that both queries take “0.00” seconds for a small dataset, and this woul…
