0

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

1
  • Custom taxonomies don't have to be hierarchical like categories, they can be non-hierarchical like tags, in fact tags are just a non-hierarchical taxonomy
    – Tom J Nowell
    Sep 15, 2020 at 12:02

1 Answer 1

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:

enter image description here

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.

3
  • Got it, thanks for the advice
    – Henry
    Sep 15, 2020 at 12:20
  • 1
    If this answers your question, consider marking it as the accepted answer by clicking the large tick under the voting controls
    – Tom J Nowell
    Sep 15, 2020 at 12:23
  • 1
    Thanks @Tom in fact I am using WordPress Pods which has a very neat way of doing this. I definintely learned something today about flat hierarchical taxonomy...great stuff...
    – Henry
    Sep 15, 2020 at 12:39

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .