A common question I hear from new WordPress users is “What is a taxonomy?”
Perhaps the initial confusion comes about because the word “Taxonomy” is hardly commonly used in normal conversation unless you are a biologist!
Where Does the Word Taxonomy Come From?
The word Taxonomy comes from the Greek words for “arrangement” – taxis and “method” – nomia.
So any method or arranging a collection of things can be called a taxonomy.
It is used a lot in biology to talk about classifying living organisms, organizing them according to their similarities or species.
What is a WordPress Taxonomy and Why Should You Care About It?
Humans love to arrange and group things together.
Watching my little boy grow up, one of the first activities he started to do was to sort his things out by shape, colour and size. It’s a natural thing for all of us to do.
For a second, imagine a world without taxonomies.
How difficult would it be to find a specific book from a library if all the books in there were just stored on the shelves in a random order?
No Sci-Fi, History, Biographies sections. No, By Author references.
Similarly, you want your website visitors to be able to find the content they are looking for in your blog or special interest area.
WordPress comes with two default taxonomies for you to use with your posts – categories and tags.
What Are the Difference Between WordPress Categories and Tags?
There are two main differences between WordPress categories and tags.
First, Categories are hierarchical which means that you can add sub-categories to parent Categories, whereas tags have a flat structure. So you can put categories inside other categories but you can’t do that with tags.
Second, WordPress posts must be associated with at least one category, but they don’t have to have any tags.
So, to reiterate the differences between categories and tags for WordPress posts:
- Categories = hierarchical and required
- Tags = flat and optional
When Should You Use Categories vs Tags?
I get asked this question a lot from WordPress beginners trying to get their heads around the concept.
When To Use WordPress Categories?
Categories are used for the broad grouping of posts.
Think about a news website and the main groupings at the top of the site such as World, Politics, Business, Health, Entertainment and Sport.
For most sites, 10 or fewer categories should be sufficient to allow you to broadly categorise a post.
When To Use WordPress Tags?
Tags are used to specify a very narrow grouping, perhaps just being applied to a single post.
For example, if you were writing a post on a new website about a US 2020 election candidate, you may want to set up the taxonomy like this:
Tags: US 2020 Election, Elizabeth Warren
Can You Assign Multiple Categories To A Single WordPress Post?
The quick answer is yes, you can.
A better question to ask would be “Should you assign multiple categories to a single WordPress post?“.
I would suggest that you don’t. Stick to a single category for each post.
If you find that many of the WordPress posts you write are falling into multiple categories, then perhaps your categories may be too broad – try to be a little more specific.
Similarly, have a re-read of your article – is it covering multiple topics that you can break down into simpler seperate posts that fit nicely under one category.
If your post really does straddle two categories I would suggest picking one that best fits in with the context of your post.
For example, if you are writing a post about the mental health of small business owners, you could categorise it under “Business” or “Mental Health”.
As the post context is clearly mainly about mental health, I would suggest filing the post under that category only.
It’s a rule of thumb that I adhere to in my own posts.
Another method to resolve that issue would be to add more specific sub-categories underneath your broad parent category.
How To Display Taxonomies On Your WordPress Site?
This is the easy part and built into WordPress in the form of widgets.
Widgets are small blocks of content that can appear in specific areas of your site such as a left or right sidebar, under the header navigation or in the footer area.
You can add widgets from the dashboard at Appearance > Widgets or in the Customizer as shown below:
There are widgets for categories and tags with some simple options for displaying.
If you need more advanced widgets, you can search for those on wordpress.org/plugins.
Custom Post Types and Custom Taxonomies
One of the reasons WordPress is so popular is because it is highlt customisable.
It allows developers to create their own post types (like Posts and Pages) and their own taxonomies (like Categories and Tags).
Sometimes a theme or a plugin will create new post types or new taxonomies.
I’ll leave an explaination of thse for a later post – I just wanted to briefly mention them.
WordPress taxomonies allow us to group posts together so they are easily found and managed by humans.
Categories and Tags are the default WordPress taxomonies but themes and plugins can create their own.
Categories allow us to broadly group posts. They are hierachial and required for all Posts.
Tags allow us to add specific words and terms unique to a Post. They have a flat structure and are optional.
Let me know if you still have questions on taxonomies in the comments below.