In WordPress, a taxonomy is used to group posts and custom post types together. The word ‘taxonomy’ comes from the biological classification method called ‘Linnaean taxonomy’.
By default, WordPress comes with two taxonomies, categories and tags. However, if you are using custom post types, then you may wish to use custom taxonomies.
Xem thêm: Taxonomy wordpress
Taxonomies can also be hierarchical. That means that you can create main topics that have their own subtopics.
What are the Default Taxonomies in WordPress?
The default taxonomies in WordPress are categories and tags.
Categories are meant to group your posts broadly. Think of them as general topics or the table of contents for your WordPress site.
For example, a news website could have categories for articles filed under World News, Local News, Weather, and Sports.
Posts that are not assigned a category are automatically filed under the default category. On a new website, this is ‘Uncategorized’, but the default category can be changed.
Categories are hierarchical, and this means you can create subcategories. In the example below we created a parent category called ‘Cameras’, and added a subcategory called ‘DSLR’.
You can learn more about parent and child categories in our guide on how to create categories and subcategories in WordPress.
Tags are meant to describe specific details of your posts. Think of these as your site’s index words. They are keywords that focus on specific details of your content, rather than overall themes.
For example, if you filed a post under the “Book Reviews” category, then you could assign tags like Fiction, Mystery, Stephen King, and Agatha Christie.
Unlike categories, tags are not hierarchical. They are also not required.
The correct use of categories and tags can improve your site’s SEO. For more details, see our guide on best SEO practices for sorting your content.
Creating Custom Taxonomies in WordPress
Custom taxonomies allow you to further customize the way you sort your content.
For instance, if a website owner creates a custom post type called ‘Books’, then they might like to sort it using a custom taxonomy called ‘Subjects’.
Custom taxonomies are hierarchical. If your main subjects are Fiction and Nonfiction, then you could create subtopics like Adventure, Fantasy, and Romance.
A lot of popular WordPress plugins use custom post types to store their data.
- WooCommerce adds a ‘product’ custom post type to your WordPress site
- WPForms creates a ‘wpforms’ post type to store all your forms
- MemberPress adds a ‘memberpressproduct’ custom post type
For more details, see our guide on when you need a custom post type or taxonomy in WordPress.
We hope this article helped you learn more about taxonomy in WordPress. You may also want to see our Additional Reading list below for related articles on useful WordPress tips, tricks, and ideas.
If you liked this guide, then please consider subscribing to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
- When Do You Need a Custom Post Type or Taxonomy in WordPress
- How to Create Custom Taxonomies in WordPress
- How to Add Categories to a Custom Post Type in WordPress
- How to Add Taxonomy Images “Category Icons” in WordPress
- How to Add Categories and Subcategories in WordPress
- How to Convert WordPress Categories to Custom Taxonomies
- Categories vs Tags – SEO Best Practices for Sorting your Content
- Post Types