I think with some struggle I've learned that WordPress no longer allows post slugs to be a numeric value exclusively.
That means I cannot do website.com/programs/summer-camp/2025
because wordpress automatically adds a hyphen to the post slug that is only a number. So it becomes
website.com/programs/summer-camp/2025-2
This is frustrating.
I want to create a hierarchical CPT called "Programs" with slug "programs". Then I want the parent posts to serve as evergreen content pages for SEO purposes. So for example I would create the following parent posts
website.com/programs/summer-camp
website.com/programs/history-month
website.com/programs/ramadan
And then every year there is an annual recurrence of these programs. So I was thinking of doing child posts for each
website.com/programs/summer-camp/2025
website.com/programs/summer-camp/2026
website.com/programs/summer-camp/2027
website.com/programs/history-month/2025
website.com/programs/history-month/2026
website.com/programs/history-month/2027
website.com/programs/ramadan/2025
website.com/programs/ramadan/2026
website.com/programs/ramadan/2027
But unfortunately, WordPress won't accept those child posts as "2025", instead it forces "2025-2".
How can I approach this so that I can achieve the desired URL structure? Are there better approaches?
ChatGPT suggested to create a 2nd CPT called "Program Sessions" with slug "program-sessions" and then try to use rewrite rules to rebuilt the struture.