What Is A Custom Taxonomy?
A taxonomy is a way to have orderly classifications of items. In this case, a WordPress taxonomy is a way to categorize your post types. By default, WordPress comes with two taxonomies for your Posts, and chances are you have used them and already know what they do. I’m referring to Categories and Tags. In fact, Divi even adds categories and tags for its own Projects custom post type that comes with Divi. You can also see examples of taxonomies if you are using WooCommerce. Things like Product Categories and Product Attributes are taxonomies.
So now you have an idea of what these are. And these are great, but did you know you can make your own additional taxonomies? That’s right, and you can use our free generator! This super handy tool allows you to create your own custom taxonomies in Divi and assign them to any post type you want!
How To Use Custom Taxonomies In Divi
It’s really easy to use custom taxonomies in Divi. They go perfectly with custom post types, which you can learn more about in our other tutorial on custom post types in Divi. If you have used the Divi Theme Builder (which I sure hope you do by now) then you will be happy to know that custom taxonomies are just like default taxonomies when it comes to using them.
Theme Builder Support
The main way that taxonomies integrate with Divi is in the Theme Builder. When you go to Divi>Theme Builder and assign a template, you can choose to assign a template to the new taxonomies that you create just like any other taxonomy.
How To Create A Custom Taxonomy In Divi
There are at least two ways to make a custom post type. You basically can choose to use a plugin, use a generator, or hire a developer.
Use A Plugin
If you want to use a plugin, you could check out Custom Post Type UI, Pods, or another similar plugin. These plugins provide an interface for you to enter the data. Just remember, this is not automatic, but manual. Just because it is a plugin does not mean it is easier. To me, it makes more sense to use one less plugin and use our generator.
Use A Generator (Recommended)
I am all about teaching and learning, so I think you should try our generator instead of relying on a plugin to do the same thing. And the problem with the plugin method is that you have to keep it installed, whereas this way you can paste your snippet and be done! And our generator auto-populates the fields, which is super cool!
How To Use Our Free Divi Taxonomy Generator
If you haven’t yet, be sure to keep our Custom Taxonomy Generator open in a new tab as we go along. Be sure to click on the Taxonomy tab, since the Post Type tab will come up by default.
The rest of this post will be an explanation of each of the features of the generator. I’ll do my best to break it down into simple language.
This is the singular name you want to call your custom taxonomy.
Notice that when you type the name into the field, most of the other fields in the generator under the General and Labels sections auto-populate!
This is the plural form of the name.
This is the main value that the code uses to reference the taxonomy. This is usually a singular small case version of the name.
This section is where you choose where to assign the new taxonomy. You can choose to assign it to the existing default post types like Pages or Posts, or assign it to a new custom post type that you have already generated.
Custom Post Type
To assign the taxonomy to an existing custom post type, simply find the post type key and type it in the box. You can learn more by reading our other tutorial about how to create custom post types.
This allows you to configure how each of the post types labels will appear. If you want to see this in action, just browse around your site and look at how this works for pages and posts. Our generator will add these automatically, but you can edit them as needed.
This allows you to configure how you would like your post type to appear in the back end of WordPress.
A hierarchical taxonomy can have a parent and one or more children. The default categories in WordPress are a good example of a hierarchical taxonomy. One category can be the parent of other categories in a hierarchical fashion.
This option changes the visibility of the WordPress taxonomy to authors and visitors. Just keep this set to True.
Show Admin UI
This determines where the custom taxonomy is shown in places like the admin bar at the top of the WordPress back end. This should be set to True.
Show Admin Column
This is the column in the backend of a post type where you can view the name, slug, date, etc. Keeping this on True will show the column for your custom taxonomy, which is most likely what you want.
Show in Navigation Menus
This sets whether the new custom taxonomy items will be available in the WordPress navigation menus. Most likely you would want to to be set to True.
Show In Tag Clouds
This usually refers to the WordPress tag cloud widget, so if you want the ability to show your new taxonomy like that then keep this on True.
There you go! That’s how you can use our free generator to use custom post types in Divi. Be sure to watch the video above.
If you want to take this further, we have a lesson on custom post types and more in our Beyond The Builder course, so consider purchasing that if you build or manage websites with Divi and WordPress.