In this article, you will learn what taxonomies are and how they apply to your WordPress site. If you’re new to the world of WordPress, you may be confused about the term, but it’s actually a very basic concept. In short, taxonomies help you categorize the contents of your WordPress site.
What are taxonomies and how can they help me?
Essentially, taxonomies on WordPress allow you to group similar content together. For example, if you have a lifestyle and well-being blog, you can create taxonomies for the different elements of your blog, e.g, healthy recipes, health tips, yoga, etc. Taxonomies help you easily organize your content, and they also help your site visitors out too.
For example, they help readers to easily find related content, and, as a secondary benefit, they also provide context to your content. If someone visits your lifestyle and well-being blog, but they are only interested in yoga, instead of going through all of your various posts, they can go directly to the yoga-related posts, which will have been previously grouped together, thanks to taxonomies.
Taxonomies are everywhere online, but we are so used to them that we don’t even realize that we are using them. Think about when you are looking for a product on Amazon or for a film genre on Netflix, their content is grouped into categories to make your search much easier. This system can be applied to your WordPress as well!
Default taxonomies supported by WordPress
WordPress allows two types of taxonomies:
You can see these taxonomies while writing a new post, at the right side of the WordPress Editor:
You can add taxonomies directly from the Editor, or you can edit them from the Posts option on the left sidebar menu.
Categories vs tags
The interface for categories and tags is slightly different. For categories, WordPress makes a list with all the ones you have created, whereas with tags, there is only a box to add them.
Whether you choose to use categories or tags depends entirely on your post. However, you must remember that every blog post needs a category, but tags are optional.
Categories are hierarchical and can have subcategories. Whereas tags cannot; they are entirely self-contained.
Categories are meant for grouping content together. Some sites have around ten main categories on their sites; some have less.
The difference with tags is that they only apply to one specific post. Most sites can have hundreds of different tags; some are shared by many posts, and some aren’t.
If we go back to the idea of having a lifestyle and well-being blog, this is how the taxonomies would work if you were to write a recipe post:
- Category: Recipes
- Tags: fish, grilled dishes, low calories
Multiple categories in a post
You can add multiple categories to one single post, but should you do it?
If you occasionally add a post to multiple categories, it won’t cause that much of a problem. However, if you assign multiple categories to most of your posts, you may need to rethink your category system.
You can solve this by changing your narrower categories into subcategories that form part of a broader category. Let’s say your blog has a section on “vegetarian recipes” and another on “gluten-free recipes.” Instead of keeping them separate categories, you can categorize them into subcategories within the “Recipes” category.
Displaying WordPress Taxonomies on Your Site
You can easily display tags and categories with WordPress widgets. To do this, go to Appearance > Widgets and drag Categories and/or Tag Cloud widgets:
Better categorization with custom taxonomies
Even though WordPress only offers you categories and tags as taxonomies, this doesn’t mean that you have limited options. With Custom taxonomies, you can create unlimited types of taxonomies.
You can structure taxonomies in the way that you want. For example, if you have a blog about films, you could create taxonomies for directors and genres so your readers can easily find the content that’s appealing to them.
Creating Your Own Custom Taxonomies
Creating your WordPress taxonomies is a straightforward process, and you can do it using either a plugin or coding.
If you prefer to use a plugin, these are some options:
These plugins are very recommendable, but if you would rather create your taxonomies manually, use the register_taxonomy() function.
After adding your custom taxonomy, you will be able to visualize it as a new box on the right side of your WordPress Editor:
If you need help with your HostPapa account, please open a support ticket from your dashboard.