InMotion Hosting Support Center

In this article, we're going to show how you can create and use custom taxonomies in your WordPress posts. We'll also explain what custom taxonomies are and how they're used in WordPress. In order to create our taxonomies, we'll be using the Custom Post Type UI plugin.

What is a Custom Taxonomy?

Taxononies are what WordPress uses to organize your posts. You may already be familiar with the default taxonomies that come with WordPress: categories and tags.

You use categories and tags alongside posts. For example, if your posts are about music you may have a category called Rock and Roll and a sub-category for 1950s. You may also have tags like Buddy Holly, The Drifters, or Elvis Presley associated with various posts. These help your readers know what the post is about and find other related posts. This can also help your site be more easily readable by search engines.

Hierarchical

Taxonomies can have parent-child relationships that make them "Hierarchical".

For example, categories can have sub-categories and sub-categories can have sub-categories of their own and so forth:

  • Music (Parent)
    • Classical (Child)
    • Rock (Child)
    • Hip Hop (Child)
  • Movies (Parent)
    • Action/Adventure (Child)
    • Sci-fi (Child)
      • Space Opera (sub-Child)
      • Flying Saucers (sub-Child)
    • Documentary (Child)

Notice above that parent and child relationships are virtually unlimited in terms of how complex the hierarchy can be. Child nodes can have their own children. You determine the level of depth required for keeping your site organized and user-friendly.

Non-hierarchical

Taxonomies can also be non-hierarchical, meaning they have no parent-child relationships. This is how post tags are used. In this scheme, each term associated with a post is of equal value. Again, how you choose to use these terms depends on how you want to organize your post content.

How to Register Taxonomies

For our demonstration, we're going to be using the Custom Post Type UI plugin. In addition to creating custom post types, this plugin lets you easily create taxonomies that you can associate with your post types.

For example, you can create a custom taxonomy for your default WordPress posts or a new category or tag for a custom post type.

  1. Log into your WordPress Dashboard
  2. Choose Add/Edit Taxonomies under CPT UI (left panel)
  3. Fill in the label fields

Be sure to pay attention to which labels are singular and plural. This will make usage of your taxonomy within the WordPress interface easier.

Which Settings Should I Use?

For the most part, the default settings are acceptable for creating a new taxonomy. Here are some of the settings you may want to pay closer attention to in customizing your taxonomy for your needs:

Setting Purpose
Taxonomy slug Part of the URL structure of this taxonomy (will also display an archive page)
Attach to Post Type To which post type will this taxonomy apply?
Hierarchical Will this taxonomy have parent-child relationships (like a category) or remain non-hierarchical (like a tag)?

Using Your Custom Taxonomy

You should now see your custom taxonomy available under the post type it applies to. Here you will be able to manage your custom taxonomy by adding new ones and editing the ones you've created.

Was this article helpful?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!