![]() |
VOOZH | about |
Organizing content efficiently is crucial for both user experience and site management purposes. And for WordPress sites, taxonomies play a pivotal role by grouping related content together.
This guide covers the concept of WordPress taxonomies, explores the default options, and provides a step-by-step approach to creating custom taxonomies.
In simple terms, a taxonomy is a way to group and classify content. It helps you organize posts, pages, and custom content types into meaningful groupings, making it easier for:
Think of taxonomies as labels or buckets that allow you to sort your website content.
WordPress includes two main built-in taxonomies by default:
While the default WordPress taxonomies are useful in many situations, they may not be sufficient for all websites. Here are common reasons to create custom taxonomies in WordPress:
For sites with a lot of content, custom taxonomies make navigating and organizing information much easier. Unlike default categories and tags, you can create custom taxonomies around specific use cases based on your unique content.
For instance, a book review website might need to classify content based on Author, Publisher, or Publication Year rather than relying solely on broad categories like Fiction and Nonfiction.
A well-structured site improves engagement by allowing visitors to find relevant content faster. If an online store enables filtering by Brand, Material, or Product Type, customers can navigate inventory more efficiently.
Similarly, a travel blog could use taxonomies such as Destination, Travel Style, and Budget Range to help people discover relevant articles.
For sites that use specialized post types, custom taxonomies become even more useful.
A real estate listing website, for example, may use custom post types for Properties and define taxonomies like Property Type, Neighborhood, and Price Range. Without these specialized taxonomies, content organization would be much less intuitive.
When a website includes large volumes of information, the ability to filter content efficiently is crucial. Custom taxonomies allow for advanced filtering, making it easier for people to sort through content based on specific parameters.
Ecommerce sites, recipe databases, and directory websites particularly benefit from this setup.
Custom taxonomies can contribute to better search engine optimization (SEO) by creating more descriptive URLs, improving internal linking, and enabling highly-targeted content segmentation.
When properly configured, custom taxonomies help search engines understand the structure of a website and how pieces of content relate to one another, resulting in better indexing and rankings. For example, a movie review site could generate SEO-friendly URLs like /reviews/action-movies/ instead of just /reviews/.
Default categories and tags may seem sufficient, but overusing them can lead to disorganization. Tags often become cluttered and inconsistent when used without a structured plan.
Custom taxonomies ensure that content is classified in a consistent, scalable way, reducing redundancy and improving overall site management.
On multilingual websites, custom taxonomies can segment content based on language or region, improving the user experience for global audiences. For instance, an international news website could use taxonomies like Region or Language to help visitors immediately find content relevant to their location.
There are two main ways to add custom taxonomies to your WordPress site: manually with code and using a plugin. Below, we’ll cover both methods so you can choose what works best for your website.
To create a custom taxonomy manually, you’ll need to add some code to your theme’s functions.php file. Make sure you’re either editing a child theme or using a code snippets plugin to avoid overwriting your work when you update your theme.
Read this guide for full details on editing the functions.php file.
Below is an example of how to create a custom taxonomy called Genre for a custom post type called Books:
function register_book_genre_taxonomy() {
$labels = array(
'name' => 'Genres',
'singular_name' => 'Genre',
'search_items' => 'Search Genres',
'all_items' => 'All Genres',
'parent_item' => 'Parent Genre',
'parent_item_colon' => 'Parent Genre:',
'edit_item' => 'Edit Genre',
'update_item' => 'Update Genre',
'add_new_item' => 'Add New Genre',
'new_item_name' => 'New Genre Name',
'menu_name' => 'Genre',
);
$args = array(
'hierarchical' => true, // Set to false for non-hierarchical (like tags)
'labels' => $labels,
'show_ui' => true,
'show_admin_column' => true,
'query_var' => true,
'rewrite' => array('slug' => 'genre'),
);
register_taxonomy('genre', array('books'), $args);
}
add_action('init', 'register_book_genre_taxonomy');
Here’s an explanation of the elements of this code:
Upload the file and check your WordPress dashboard. You should see Genres under the Books menu.
If coding isn’t your thing, plugins like Custom Post Type UI make it easy to create custom taxonomies without touching a line of code.
The most powerful AI tool for WordPress
Turn your ideas into ready-to-publish content at lightspeed.
Elevate your contentGo to your post type in the dashboard and confirm that the new taxonomy appears properly.
If you’re using custom post types, associate the custom taxonomy to the correct one with this code:
register_taxonomy( 'genre', array( 'movies' ), $args );
Here, ‘movies’ is the custom post type.
Once created, you can manage custom taxonomies through the WordPress admin dashboard:
To use custom taxonomies effectively:
For those uncomfortable with coding, several plugins can assist with creating and managing custom taxonomies:
Organizing content manually can be time-consuming, especially for large sites with extensive content libraries. This is where Jetpack AI Assistant can help.
Jetpack AI Assistant is a powerful AI-driven content creation tool that simplifies WordPress site management. It can assist with generating content, improving readability, and even suggesting taxonomy structures that align with your site’s goals.
If you’re managing a site with custom taxonomies, Jetpack AI Assistant can help by:
By integrating Jetpack AI Assistant into your workflow, you can maintain a well-structured site while focusing on content quality and user engagement. Try Jetpack AI Assistant today to bring intelligent automation to your WordPress site.
A taxonomy is the system you use to group posts together. A term is a single item inside that taxonomy. For example, “Category” is a taxonomy. “News” and “Updates” are terms inside the “Category” taxonomy.
Think of a taxonomy as a box for organizing things. The terms are the labels you put on the items inside that box. You have two default taxonomies in WordPress: Categories and Tags. You can also create your own custom taxonomies, such as “Author” for a book review site.
A hierarchical taxonomy works with levels of importance. It allows you to have a main group and smaller groups inside it. This is the parent and child relationship. Categories are the best example of this. You might have “Fruit” as a parent and “Apple” as a child.
A non-hierarchical taxonomy is flat. It has no levels or parents. Everything is equal. Tags are the best example of this structure. You use non-hierarchical taxonomies to label specific details that do not need to be in a strict order. You choose the type based on how you want to sort your data.
It is best to put each post in only one category. If you must use two, that is okay, but more than two can confuse search engines and visitors. One main category keeps your site structure clean.
For tags, there is no perfect number. A good rule is to add between three and ten tags that are very relevant to the post’s content. Do not add dozens of tags. This does not help with SEO. Use tags to describe the specific topics in the post, not to list every possible keyword.
Yes, taxonomies can create duplicate content issues if you are not careful. This happens when the same post appears on multiple category or tag pages. It can also happen if your taxonomy archive pages show only short excerpts without any unique text.
Search engines may see these pages as low-quality. To prevent this, assign each post to only one primary category. You can also add unique introductory text to your most important category pages. For tag pages that are not very important, you can tell search engines not to index them.
You should create a custom taxonomy when categories and tags are not specific enough for your content. Categories are for broad topics. If you need a separate, special way to group content, a custom taxonomy is the right choice.
For instance, a movie review website could use a custom taxonomy called “Genre” with terms like “Action” and “Comedy”. A real estate website could use a custom taxonomy for “Location”. This helps visitors filter and find content in a way that makes sense for your specific subject matter.
After you create a custom taxonomy, you can show it on your website in a few ways. Many WordPress themes will automatically show the terms associated with a post, usually near the title or at the end of the article. You can also add a list of all the terms from a custom taxonomy to your site’s sidebar using a widget.
For more advanced control, you can edit your theme’s template files. This lets you place the taxonomy terms exactly where you want them and style them to match your site’s design.
A taxonomy archive page is a page that WordPress automatically creates for each category or tag. It lists all the posts that belong to that term. By default, these pages can be simple and not very useful.
To make them better, you should add unique content. Go to the editor for a specific category or tag in your WordPress dashboard. Use the description box to write a helpful introduction about that topic. This text will appear at the top of the archive page, making it more valuable for both visitors and search engines.
Using a plugin is better for most people because it is easy and you do not need to write any code. A plugin gives you a simple form to fill out to create your custom taxonomy. This method is fast and safe.
Adding code to your theme’s functions.php file is better for developers or users who need very specific options. The code method gives you full control over every setting. If you choose to use code, always use a child theme so you do not lose your changes when you update your main theme.
A common mistake is creating too many categories or tags. This makes a site messy. Another mistake is using very similar names for categories and tags, which can cause confusion. For example, having a category called “Baking” and a tag called “Bake” is not a good practice.
You should also avoid putting a single post in many different categories. This weakens your site structure. Finally, a big mistake is ignoring your taxonomy archive pages. Leaving them as simple lists of posts is a missed opportunity for both user experience and SEO.
Jen Swisher
Jen is a Customer Experience Specialist for Jetpack. She has been working with WordPress and Jetpack for over a decade. Before starting at Automattic, Jen helped small businesses, local non-profits, and Fortune 50 companies create engaging web experiences for their customers. She is passionate about teaching others how to create on the web without fear.
The most powerful AI tool for WordPress
Turn your ideas into ready-to-publish content at lightspeed.
Elevate your contentHave a question?
Comments are closed for this article, but we're still here to help! Visit the support forum and we'll be happy to answer any questions.
View support forum