Site icon Hip-Hop Website Design and Development

How to share terms between two taxonomies?

I understand that since 4.4 or so, taxonomies no longer share terms. But I have a use-case where I think I need shared terms.

For each post, I need two taxonomies: a Topic (unimited terms per post) and a Primary Topic (one term per post).

This is because a post may have topic terms for Politics, Health, and Economy, but if the primary topic is Health and I will want to use Health to build the URL.

example: mysite.com/news/health/some-headline-here
tags: health, economy, politics
  1. I could build this with two taxonomies with identical but non-shared terms. The problem with this approach is the editors will need to duplicate their efforts and make sure “health” term is applied in both taxonomies. But then what about archives? Primary Topic: Health will generate a different archive than Topic: Health, because Primary Topic Health archive will show no content with only Topic Health tags. I’d need to make some custom multi-taxonomy queries for archives.

  2. Or if I could have two taxonomies sharing the term, then a site visitor clicking the term will get the correct “health” term archive regardless if health is checked in Topic or Primary Topic. Since it’s a singular shared term, it generates a singular archive.

Any advice, or perhaps an entirely different approach?