For anyone beginning with WordPress, There are sertain terms that can be very confusing. One of them is Taxonomy. While Category is a familiar word, Txonomy is quite unheard of for a newbie WordPress User – whether a website creator or a developer. In this article, I will explain what exactly is a Taxonomy and what are the differences between a Taxonomy and a Category.
It is a beginner level article, so if you are a seasoned WordPress user, I recommend skipping this one. However, you can check out our other articles from our blog.
What is a Category
Firstly, we take a look at what a Category is. Posting just randomly on a website can become too cluttered to manage and is not an ideal way to run a blog. Also, it’s not good for SEO. WordPress provides the option to organize the posts in different sections. Let’s understand this with an example.
Suppose we have created a Food Blog where you post recipes of all kinds of dishes from all around the world. Posting the recipes on the blog is fine, but what if you want to group them together as Italian, Continental, Chinese, Mexican etc. That’s where the categories come in. You just need to create categories and assign the posts to their respective categories. So, i you posted a recipe of an Indian delicacy, put it under the Indian category. Simple enough!
What is a Taxonomy
In broad terms, any method of grouping of posts is known as a Taxonomy. A Category and Tags are two methods of grouping posts that are present in WordPress by default. hese are the Taxonomies that are present by default in WordPress. In most cases, these are enough. But sometimes, there arises the need to group posts on the basis of different parameters. Let’s try to understand this by our previous example.
In the previous example, we grouped posts on the basis of country like Indian, Chinese, Mexian and many others. But what if we need to group the posts on the basis of a different parameter, say preparation time. For that, we’ll need to create a new Taxonomy.
Creating a Taxonomy
Creating a Taxonomy is a whole new article in itself. Luckily, there is a plugin to help us out. Install the Custom Post Type UI plugin. This plugin can be used to create Custom Post Types and Custom Taxonomies. It is quite a handy plugin when you are working on client projects having custom requirements. I’ll not go in the details about navigating through the details of using this plugin. Just create a taxonomy named Prep Time. If you are adding recipes as simple post types, attach the newly created Taxonomy to Post post type. After the Taxonomy is created, you’ll see it in the Posts Menu as a Sub-menu in the dashboard. You’ll be able to create new terms in this taxonomy. Let’s say we want to group our recipes in Short, Medium and Long. We’ll create the respective terms in the Prep Time Taxonomy.
Now, you’ll be able to group the recipes by Prep Time just like Category. Now, Prep Time is the new taxonomy and just like categories, we add terms to it (They are actually called Terms in WordPress API as well). Initially, it can seem a bit tough to wrap your head around but once you get the hang of it, it is a really powerful tool in your WordPress Toolbox and is used quite a lot in WordPress universe.