So you want your custom taxonomy to appear as a checkbox?
By Anne-Mieke Bovelett on March 6, 2020
Status: updated on March 5, 2023
You were looking for the checkboxes in your sidebar, right?
You created this taxonomy, managed to connect it to the post type of your choice, and then it shows up like the tag box usually shows up. Very impractical if you actually intended this taxonomy to be like a category, that you can select when you create a new post or custom item.
I created this in CPT UI, but the principle is probably the same in any other plugin that allows you to create taxonomies!
Steps to achieve it
- Open your taxonomy.
- Scroll down to Settings.
- Set Hierarchical (third setting from the top) to True.
That’s all there’s to it!
Update, march 5, 2023:
In CPTui the developers added that setting Hierarchical to “true” gives checkboxes to the explanatory text below.
What you actually changed by doing this:
You actually changed your custom taxonomy from a tag to a category. Or better said, before hard core developers eat me alive, you changed it from non-hierarchical to hierarchical. If you want to understand what that actually means and what possibilities that creates
While both tags and categories are taxonomies, the difference between them is actually that a tag is not capable of hierarchy. You can’t make parent tags. You CAN make parent categories. This opens up a world of possibilities.
I found a great article called: How (and Why) to Convert WordPress Tags from ‘Flat’ to ‘Hierarchical’ from Thomas McGee on the CSS Tricks website.
PS About this article
This article was originally posted on March 6, 2020, on geekonheels.com. It used to be my pet project for quick tips & tricks for Elementor and WordPress in general. However, there was so much overlap with this website that I decided to move the content over.