I've created a custom taxonomy that allows my school's newspaper to organize stories into special issues. However, some of the special issues we publish are the same every year. For example, our Black History Month special issue is published every February. Because the issues have the same name, they will have the same slug, and it will look like this:
What I have now:
I would like to rewrite the URL to include the year that the taxonomy was created. It seems like the date isn't stored by WordPress, so I was going to include it in an ACF custom field (I'm using the year elsewhere):
What I want:
This looks a lot like how hierarchical taxonomy URLs look, however the special-issue
taxonomy is not:
register_taxonomy('special-issue', ['post'], [
'labels' => [
'name' => 'Special Issues',
'singular_name' => 'Special Issue',
'add_new_item' => 'Add New Issue',
'not_found' => 'No special issues found.',
'search_items' => 'Search',
'view_item' => 'View Special Issue'
],
'hierarchical' => false,
'show_ui' => true,
'show_admin_column' => false,
'query_var' => true,
'rewrite' => ['slug' => 'special'],
]);
Is this feasible, or should I just put the year in the slug?
What I might have to settle for: