Search the site:

Copyright 2010 - 2019 @ DevriX - All rights reserved.

WordPress Taxonomy Explained: The Definitive Guide

WordPress Taxonomy Guide

Taxonomies – one of the terms that WordPress website owners often hear from developers, but they don’t know for what, where, or how they’re used. In practice, taxonomies are one of the integral parts that helps you to classify your content, but the word itself can be puzzling for site owners and beginners that just got their hands on the powerful CMS.

This is why in this guide, we’ll help you learn about the concept of taxonomies, why they’re important, and how can you use them to develop structured and discoverable content for your WordPress website.

What Are Taxonomies?

A “taxonomy” might be a new word for the beginners and to understand how it is used for content categorization, you need to understand the concept behind the term “taxonomy” first. We’ll start with something that we see every day, like an apple.

An apple is something we eat (food), and it is a part of a system that we call a Food Pyramid.

The food pyramid has several sections/types of food. According to the sections above, we can categorize the apple as a fruit. Putting things into perspective, the apple itself can represent a blog post. The food pyramid is a taxonomy. Fruit is the term.

Taxonomy as a process is defined as a classification of objects. It provides you with the mechanism to group objects, or in this case, content. The term itself sounds really straightforward when we talk about apples and oranges.

In WordPress, to understand taxonomies, we need to think about the intent of the platform. You’ve developed your website and you want to convert your web visitors into customers. They’ll find and read your content, and they’ll share it.

In the WordPress world, taxonomies are what allows you to organize your content. Well organized content is easy to find, share, and interact with, which is the trick to converting your regular visitors into valuable customers.

If people find one specific piece of content on your site, how can you provide them with the opportunity to find more related content? Of course, by having a filtered UX for users to quickly find what they’re looking for.

According to WordPress Codex, a Taxonomy is defined as:

“Taxonomy is a way to group things together.”

WordPress has the following built-in taxonomies:

  • Categories: A category taxonomy lets you group your content under a common category: videos, photos, or just posts. Categories have a hierarchical structure and you can have parent-child relationships for the main categories and their subcategories.
  • Tags: A taxonomy tag allows you to classify your content, but in a less structured way than Categories. Tags can’t have parents.
  • Link Category: A taxonomy that lets you categorize your links. They’re internal taxonomies that in most cases are not displayed publicly on your site. This taxonomy is not quite popular with the latest version of WordPress.
  • Post Formats: Meta information that can be used to customize a theme or a post. Also, a powerful tool in the arsenal of a WordPress developer.
  • Custom Taxonomies: Since WordPress 2.3, you can create your own custom taxonomies, but until Version 2.9, they were a rarely used feature. In essence, they are an extremely powerful way to group various items in all sorts of ways.

From the intent of your content, you’ll know whether you’ll use a category or a tag. If you want to capture a broad topic, you’ll go with Category. If you want to get specific, you’ll insert tags too. But to have posts, a Category taxonomy is mandatory. If you don’t select a category, WordPress will add a default category, in most cases, “Uncategorized”. For a given post, you can also use multiple categories.

By using Widgets, it’s fairly easy to showcase your WordPress tags and categories.

Terms

A term speaks about the items in a taxonomy. For example, if you blog about Cars. You have Types of Cars which is your custom taxonomy. Let’s break that down further. The classification within that taxonomy can be Classic Cars, Hatchbacks, Super Cars, Sports Cars, etc. Those are the terms of your ‘Cars’ taxonomy.

Source: Petrolicious

Within Classic Cars, you have all sorts of cars, and the same goes for hatchbacks, and supercars. Perhaps your readers are interested in a specific type of classic car.

Source: Petrolicious

For each of your sub-categories, you can style your pages differently. If the users are interested in one of the cars from a given page, another customized page will be added specifically for that car. This is what terms can help you achieve on your WordPress site.

Source: Petrolicious

Taxonomy Categories

WordPress taxonomies can be classified in two ways: Hierarchically and Non-hierarchically.

Hierarchical Taxonomies

An obvious example of hierarchical taxonomy is the Category. It exists as a taxonomy of its own, and it can have numerous sub-taxonomies. The basic hierarchical category is Uncategorized.

However, if you’re building a post that is rich in different media such as images and videos, you may add the categories Photos and Videos too. Depending on your niche, you can have Product Photos, Product Usage Videos, HD Photos, and HD Videos, etc.

Photos

  • Product Photos
  • Workplace Photos
  • Store Photos

Videos

  • Product Videos
  • Workplace Videos
  • Store Videos

Non-Hierarchical Taxonomies

The default non-hierarchical taxonomy is the tag. The tag exists on its own and it doesn’t have sub-tags like the categories that have their own sub-categories. They can appear as categories too, but it is obvious that they can be applied to both the photos and the video category.

Source: WPBeginner

Tags act like labels and they help the post to be identified within a specific category.

Custom Taxonomies

In most cases, when web developers talk about Taxonomies they mean Custom Taxonomies.

WordPress has the ability to pre-define default taxonomies for you. But when you work on content development, sometimes there are situations when the default taxonomies are just not enough. This is where custom taxonomies step in, a process where you develop your own taxonomies for the purposes of a new project, and with that, you extend the WordPress code itself.

The primary goal of custom taxonomies is to develop a new way of classification that is not necessarily compatible with the common Tag and Category taxonomies.

To illustrate, let’s say that you have a website that sells tickets for sports matches. You sell tickets and you also develop content to attract and keep the audience on your site.

As the number of season tickets and content increases, you want to develop “custom” categories for each team and content that is related to that team.

In this case, you need to deploy custom taxonomies called “Real Madrid 2018/2019”. Its terms and properly location are different and separated from other categories and tags.

Create Your Own Custom Taxonomies

There are two ways to create custom taxonomies:

  • Using an existing plugin that already does that or
  • Manually adding the code.

Some of the best plugins for custom taxonomies are:

If you want to create custom taxonomies manually, you’ll need to utilize the register taxonomy() function. With this function, you can add new taxonomy, or overwrite an existing taxonomy.

Taxonomies and Gutenberg

According to our CEO and Chief WordPress Architect, Mario Peshev:

“Just as we used to build custom widgets, shortcodes, and page templates, we can build a series of Gutenblocks, prepare the corresponding templates, design the resulting front-end experience, and a lot more.”

As a matter of fact, Gutenberg has a built-in support for taxonomies. After you define the variables, you can set the taxonomies in your content and Gutenberg will collect them:

+++
...
[taxonomies]
tags = ["rust", "web"]
categories = ["programming"]
+++

The taxonomy pages will only be created if one of the non-draft pages is available at the following path:

$BASE_URL/$NAME/
$BASE_URL/$NAME/$SLUG

Wrapping Up

We hope that by reading this guide you’ll better understand WordPress taxonomies now, from their role in content categorization to the technical aspects that taxonomies are based on. Now you know when to use them, which taxonomies to use, and how they can be compatible with your web content.

From a business standpoint, it’s vital to understand that taxonomies can help you to increase the impact that your content has on your readers. By using taxonomies for your WordPress content, you will keep visitors on your website, and convert them into clients.

Browse more at:Development

Leave a Reply

Your email address will not be published. Required fields are marked *