We have a custom post type (events) that has a custom date field (event_date). There is an overview page, where we show all dates paginated by 12, first pulling out upcoming events and then past events. That’s all working fine.
What we want to do, is have a drop-down where visitors can filter by year, based on a custom date. We have a hard time coming up with a good way of doing this.
Ideally we would be able to show results on their own URLs, eg oursite.com/events/2015 etc, but this isn’t too important, we mainly just need a way to have a dropdown, which allows the user to get a filtered list of CPTs, based on custom year. In the dropdown, it would only show the years that there are CPTs with custom dates for.
Sorry @james, didn’t get to reply to this at the time. In the end we went with another solution, but I’ll be sure to revisit this solution in the future, when we need to build something similar. Many thanks for your reply!