How to Create a Custom Taxonomy
Custom Taxonomies are ways to organize and classify your content. When you have Pods installed they’re simple to create through the WordPress Admin Screens. If you’re not sure what a Custom Taxonomy is, or how to make best use of it, check out our guide to WordPress Custom Taxonomies.
Create Your Custom Taxonomy
Navigate to Pods Admin > Add New and click on the Create New button.
From the Content Type drop-down menu, ensure that Custom Taxonomy (like Categories or Tags) is selected.
The Enable Extra Fields drop-down lets you choose whether you wish to add Custom Fields to your taxonomy. This isn’t functionality that is native to WordPress, so if you do wish to add Custom Fields they will be created in a different table in your database.
Give your Custom Taxonomy a Plural Label. Let’s use the example of a book review website in which the books are organized by genre. The plural is genres.
Enter a Singular Label. In this example, the singular is genre.
Clicking on the Advanced link provides you with an advanced option. In most situations the defaults will suffice. The option is:
- Identifier – this is the name that you will use when referring to your Custom Post Type in your code and shortcodes
When you’re happy click Next Step.
The “Labels” tab lets you adjust the Taxonomy labels across your admin. These are pre-populated with the name of your Taxonomy. However, you can adjust them if you want to. Adding a new label to the first two fields will update all of your labels, or you can adjust each label individually.
The “Admin UI” tab allows you to customize the admin menu appearance, including:
- Whether to show the taxonomy in the admin menus and the default taxonomy UI
- Menu name and location (associated Post Type(s) menus (default), Settings menu, Appearances menu, a new menu item, a sub-menu to another menu)
You may wish to adjust your advanced options. These provide you with fine-tuning capabilities to alter how your Taxonomy behaves.
- Hierarchical – this determines whether your taxonomy is hierarchical, like categories, or flat, like tags.
- Associated Post Types – this is where you associate a taxonomy with a Post Type. The genre taxonomy, for example, would be associated with the Books post type.
See the WordPress codex for the register_taxonomy() function for more information about the options available in the “Advanced Options” and “Admin UI” tabs.
The “Extra Fields” tab is available if you did not choose to enable custom fields when you created the custom taxonomy:
Once custom fields are enabled, the taxonomy will have a “Manage Fields” tab to setup the extra fields:
When you’re happy with adjusting your options, click Save Pod.