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.
Labels
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.
Admin UI
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)
Advanced Options
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.
Manage Fields
If you’d like to add fields to your Custom Taxonomy (Term Meta), you would add them under the Manage Fields, just like you would within a regular Custom Post Type. Check out that section in our documentation on Creating a Custom Post Type.
Save
When you’re happy with adjusting your options, click Save Pod.