I surely cannot be the only person that wants to do this, but I have not been able to find any solution.
I have a blog listing page with two filter dropdowns: Archive & Topics (Tags). Both work great, and filter the posts appropriately. I am using a modified version of the post_filter module.
I created a custom module to display my heading with some logic to change the heading based on certain criteria. After smacking my head around a bit I did manage to get the heading for my Topics (Tags) to display, but I'm not sure how to tackle the Archive.
My if/else statement in my custom module looks like this:
I would like for my archive page to have a heading like:
June 2024
Are there any tags I can use for this or do I need some other method? I can't use the page title like I did for the topics, but perhaps the URL can be used? the problem is I have no idea how to actually set this up or how to even start.
This would work for when you have filtered by months and years as well as just years.
I tried to use date formatting but it kept throwing an error when trying to create a date string from the url parts, so had to resort to creating an array of months and matching the index.