Help Center
How to Create a Custom Taxonomy

How to Create a Custom Taxonomy

Learn how to create a custom taxonomy and taxonomy terms, manage their settings, and categorize the WordPress CPT posts with the JetEngine plugin.

Before you start, check the tutorial requirements:

  • JetEngine plugin installed and activated with Custom Post Type (CPT) created and several posts added.

    If you have not done this yet, please follow this tutorial.

Things to know

CPT posts can be categorized and sub-categorized according to any classification. These categories and sub-categories are named “taxonomies” and “taxonomy terms,” respectively.

  • Taxonomies allow categorizing post types according to any classification characteristics.
  • Terms are items inside the taxonomies that add additional classification attributes, thus building a hierarchical order within a certain taxonomy.

For example, if there is a “Countries” taxonomy, the “USA” and “France” will be taxonomy terms within it.

Create a New Custom Taxonomy

Proceed to the WordPress Dashboard > JetEngine > Taxonomies tab on the WordPress Dashboard and click the “Add New” button to create a new taxonomy.

custom taxonomy list page

The process is very similar to creating a Custom Post Type (CPT). On the newly-appeared Add New Taxonomy page, the same blocks are used: General Information, Labels, Settings, and Meta Fields.

add new taxonomy tab

Fill in the Fields With Information

In this block, we typed the Taxonomy Name (the “Property Type” value, in this case); after that, the Taxonomy Slug was filled automatically (“property_type”). Next, we selected an item from the Post Type list for which the taxonomy will be created (the “Properties” CPT in this tutorial).

general setting of add new taxonomy

In the following step, we unrolled the Label block. Here, you can set the Labels to use instead of the default titles. For example, instead of “Add New Item,” you can set “Add New Category.” Labels will be visible only on the backend, but they can make navigation a little easier. Also, you can leave the fields empty to make labels default.

After that, unroll the Advanced block and enable the toggles corresponding to the specific mode of taxonomy to make them public or shown. In this case, we left the default values.

Add the Needed Meta Fields

Move to the Meta Field block and​​ press the “New Meta Field” button. In the unrolled Meta fields setting tab, the new meta field of the “Text” Field type appears by default.

In this setting tab, we typed the Label (the “thumbnail” text), and the Name/ID field was filled automatically (the “thumbnail” text). After that, we selected the “Media” Field Type. In other fields, we left the default settings.

Read the Custom Meta Fields Overview to learn the main features of the meta fields.

adding taxonomy meta fields
Things to know

By adding the Meta Fields, it is possible to populate the taxonomy with more information and then display it through the Listing Grid widget/block/element. Prior to that, the Listing Template for the custom taxonomy should be created.

Then, we pressed the “New Meta Field” button again and added the “Colorpicker” meta field. Next, we typed the “color” Label, and the Name/ID field (“color” in this case) was filled automatically. Other fields were left with the default settings.

adding a colorpicker taxonomy meta field

Finally, scroll the tab up and press the “Add/Update Taxonomy” button.

Create Terms

As we created a taxonomy only for the “Properties” CPT, the “Property type” taxonomy menu tab appears in the post type block on the WordPress Dashboard.

We navigated to the WordPress Dashboard > Properties > Property type path and opened the Add New Tag page. 

After the taxonomy is created, you need to specify a new tag; in our case, we need to add a new “Property Type” (e.g., “Cottage, “ “Bungalow,” etc.).

Next, fill out the Name and Slug, enter the Description (if needed), and then click the “Add New Tag” button.

adding new taxonomy terms

After that, you will be redirected to the Add New Tag page. The previously created new term(s) will be listed on the right side of the page.

added taxonomy terms enlisted

Edit the CPT

Open a CPT post on which you assigned the taxonomy. Then, unroll the taxonomies listed on the right side and select the needed taxonomy term (the “Cottage” Property Type taxonomy in our case). 

assigning the taxonomy term to a cpt post

Click the “Update” button to save the changes.

That’s it. Now you know how to create custom taxonomy and taxonomy terms.

Was this article helpful?
YesNo

Need help?

Ask Facebook community

Get answers from 30K+ Crocoblock Community experts from all over the world.

Start a live chat

Ask question to support agent and share its details via chat messages.