This isn't a code specific question, it's a little more general.
I have events happening every year and want to have a post for each one. The name should be the same for each year, so the url's would be something like:
domain/events/2021/event-name
domain/events/2022/event-name
I initially set this up using a custom post type for 'events' and with a taxonomy for 'year' with the plan of just creating each event and assigning the relevant year.
The problem with this is that I cannot have the same slug more than once so I end up with:
domain/events/2021/event-name
domain/events/2022/event-name-2
I could create a custom post type for each year, but I feel like that is not a very elegant solution, and would prefer not to have to create a new custom post type every year.
I wondered if anyone can suggest a good approach for this?
Thanks in advance!