I have several Custom Category Taxonomies but what I am wondering is, if it’s possible to have a second set of “tags”?
I am using my tags for a very specific purpose (the naming of cities) so I don’t want to mix up that with what I need for another set of tags.
Sure, I can create another Category Taxonomy but the quantity of items means that a “tag” environment might be better…
Thanks
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
No, you can’t have 2 groups of a singular taxonomy, so there is no way to separate post tags from each other without introducing hierarchy.
However, you could register a city taxonomy and declare that it’s non-hierarchical. That’s the primary difference between categories and tags. Categories have hierarchy, tags do not. Any taxonomy you register this way will have the same UI as tags.
For example, I registered a talk tag taxonomy for a CPT on my own site:
I just set hierarchical to false when I registered it.
In general, don’t repurpose tags and categories for things, just register a new taxonomy, it saves a lot of trouble and makes your life easier.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0
