The Difference Between Taxonomies, Categories, and Tags (Oh My!)

A common question for new WordPress users is, “what’s the difference between categories and tags?” Like everyone knows what a “category” is, but the idea of “tags” can seem very similar. And then you throw in related WordPress concepts like “taxonomy”, and things can get confusing very quickly. But no worries, it’s really not that complicated. Let’s break it down..

Contents

Taxonomies

In WordPress, Taxonomies are used to organize posts. There are different types of taxonomies. The two most familiar types of Taxonomies are Categories and Tags. Both are enabled by default when you install WordPress. So when you create a post, you can choose which categories and tags should be assigned.

Currently, WordPress provides three taxonomies by default:

  • Categories – hierarchical taxonomy
  • Tags – non-hierarchical taxonomy
  • Post Formats – non-hierarchical taxonomy

In addition to these default taxonomies, a WordPress site also may support some Custom Taxonomies that are provided by plugins. For example, an e-commerce plugin may add custom taxonomies for things like “Product Type”, “Price Range”, “Brand Name”, or any other attribute. And for each of these taxonomies, you can add any number of terms.

Note: You can learn more about Post Formats at WordPress.org.

Notice in the above list of default taxonomies, that Categories are hierarchical while Tags are not. This means that categories can have sub-categories (aka child categories), like this:

  • Hats
  • Shirts
  • Pants
  • Shoes
    • Fast shoes
    • Slow shoes
    • Nice shoes
      • Smooth shoes
      • Fancy shoes
      • Funny shoes

Categories can have as many sub-categories as needed. Tags on the other hand, are non-hierarchical, so there are no child tags or grandchild tags. It’s a “flat” taxonomy. Further, any custom taxonomies may be either hierarchical or non-hierarchical, depending on how they are configured.

Note: Some themes also provide their own custom taxonomies, although they shouldn’t. According to WordPress best practices, adding custom taxonomies is “plugin territory”. Only plugins should provide custom taxonomies.

Simple example

To illustrate, say we have a post that describes a store product, like shoes. It might have the following taxonomies (left column) and terms (right column):

Post = Shoes that don't leave any footprints

	Category:      Store
	Tags:          stealth, speed
	Product Type:  shoes
	Price Range:   $100-$300
	Brand Name:    Rolf Ahl

This shows how taxonomies are used to define relationships between posts. So on the front end, visitors can sort items based on their category, tags, product type, and so forth. Indeed, any aspect of your posts can be classified and organized with taxonomies.

Real-world example

To check out an effective use of taxonomies, visit Amazon.com and do a search for something like “shoes”. Then look in the sidebar at all the different ways to sort the results. Each of those sidebar sections (like “Shoe Size” and “Shoe Width”) are added via custom taxonomies. Amazon doesn’t actually run on WordPress, but it’s a great example of taxonomies.

Search results for 'shoe' at Amazon.comAll the sidebar options are examples of custom taxonomies.

As shown here, taxonomies enable your visitors to easily sort through your posts and find related and similar content.

Categories vs. Tags

As discussed, both Categories and Tags are types of Taxonomies. The only technical difference is that Categories are hierarchical, while Tags are not. So with categories, you can create sub-categories (or child categories). With tags, you cannot. Tags always have a “flat” organizational structure.

Other than that, the main difference between Categories and Tags has to do with scope. With WordPress:

  • Categories are used to broadly organize posts into groups
  • Tags are used to denote any specific post characteristics

I know that’s a bit abstract, so let’s go through some “real-world” examples..

Categories: real-world example

Let’s say it’s our job to clean up a house that has tons of junk in it. There are piles of stuff all over the place, and it’s our job to go in there and clean it all up. First we create two piles: “stuff that stays”, and “stuff that goes”. Those two piles represent categories.

After hauling away the “stuff that goes” pile, it’s time to organize the “stuff that stays”. Again, we use categories to make things easier. There are many ways we could categorize all the remaining items. We could organize by room, so our categories would be like:

  • Living Room
  • Kitchen
  • Bathroom
  • Bedroom

Makes sense, right? It’s the same idea with WordPress posts. Categories simply group similar types of posts together. For the purpose of organizing content and making it easier for visitors to find.

Categories: another example

Generally categories represent broad similarities among items, but you can get as specific as you’d like. For example, it’s common for a web-development site to group posts into the following categories:

  • CSS
  • HTML
  • PHP
  • JavaScript
  • Etc.

..such that each coding language gets its own category. That’s gonna keep posts broadly organized based just on the language. All posts about CSS go into the “CSS” category. All posts about HTML into the “HTML” category, and so forth.

But you can get more specific with categories. Say our tutorial site has a LOT of posts on all the coding languages. We might want to refine our categories to include version information, for example:

  • CSS
    • CSS 1.0
    • CSS 2.0
    • CSS 3.0
  • HTML
    • HTML 4.0
    • HTML 5.0
  • Etc.

Because categories can be hierarchical, we can get as specific or as broad as is necessary to organize your posts. And to organize things even further, we can throw tags into the mix..

Tags: real-world example

Returning to our “hoarder house” example, let’s look at how we can use tags to help further organize things. Recall that all the stuff currently is organized by room. So our categories are:

  • Living Room
  • Kitchen
  • Bathroom
  • Bedroom

In each room, we can further organize things by adding a tag to each item. For example, we tag the “chairs”, “tables”, “desks”, “electronics”, “clothes”, “food”, “towels”, and so on. And the nice thing about tags is that they can be added across categories. There may be “chairs” in both Living Room and Kitchen categories. Or there may be “electronics” in all categories. So when visitors arrive at your house, they can click the “food” tag and eat all of your food, regardless of which room it’s in :)

10-second summary

The difference between Taxonomies, Categories, and Tags:

  • Taxonomies are used to organize posts. WordPress provides two default Taxonomies: Categories and Tags. It’s also possible to create Custom Taxonomies. Taxonomies may be hierarchical or non-hierarchical.
  • Categories are used to broadly organize posts into groups. Categories may have a hierarchical structure.
  • Tags denote any specific post characteristics. Tags are non-hierarchical, flat organizational structure.

Resources


How to Properly Rename Categories in WordPress (Beginner’s Guide)

Do you need to rename some categories on your WordPress site?

As your site grows, you might need to change the name of some of your categories or merge them with other categories.

In this article, we will show you how to properly rename categories in WordPress without affecting your SEO strategies.

How to Properly Rename Categories in WordPress

Why Rename Categories in WordPress?

If you’ve recently created a WordPress website, then creating a good organizational structure will make it easier for your visitors to find your content and can help your site rank higher in search engine results pages.

That’s why WordPress offers categories and tags. You can learn how to organize your content effectively in our guide on best practices for categories and tags.

As you add more content, you may wish to improve the way you organize your posts, and you may decide to rename some of your categories.

Let’s have a look at how to properly rename categories in WordPress.

How to Properly Rename Categories in WordPress

You will find the WordPress category management area by visiting Posts » Categories. On this page, you can manage WordPress categories, edit existing categories, and delete unwanted categories.

There are two ways to rename categories. The first is to click the ‘Quick Edit’ link under the category you wish to rename.

Click the Quick Edit Link

The Quick Edit metabox will now be displayed. Here you can quickly change the name of the category.

You can also change the category’s slug, which determines the URL of the category page. For example, if the slug is ‘books’, then the category page URL will be:

https://example.com/category/books
The Quick Edit Metabox Will Now Be Displayed

Editor’s Note: You don’t have to change the slug if you’re only making a minor name change, but if you do, then you must set up a 301 redirect. We will show you how to do that later in this article.

Make sure you click the Update Category button when you’re finished.

The second way to rename a category also allows you to add a description of the category. To do this, you will need to click the ‘Edit’ link under the category you wish to rename.

Click the Edit Link Under the Category You Wish to Rename

This will take you to the category edit page. Here you can change the category name, slug and description.

Category Edit Screen

The category edit page also lets you choose a parent category. You can learn more in our guide on how to add subcategories in WordPress.

Changing the Category Prefix

WordPress also allows you to change the /category/ prefix in category URLs. This is called the category base.

To change it, go to Settings » Permalinks and scroll down to ‘Optional’. There you will see a form to change category base and tag base.

WordPress Also Allows You to Change the Category Prefix in Category URLs

The default category base is ‘category’. Here, you can change it to anything you like, such as ‘topics’.

This would change the URL from http://www.example.com/category/your-category-slug/ to http://www.example.com/topics/your-category-slug/.

Merging and Bulk Editing Categories

As your site grows, you may decide to simplify your organizational structure and merge several categories into one.

This is useful if you find that you have a few categories that are very similar. By combining them into a single category, you will make your WordPress site less complex and easier to navigate.

To learn how, check our guide on how to merge and bulk edit your categories and tags.

Merge categories, tags, or terms in custom taxonomies

Redirecting Users to the New Category URL

If you changed the category’s slug, then the URL to the category page has changed and the old URL will no longer work.

Luckily, if you added that category to your WordPress menu, then WordPress will automatically update the menu to reflect your changes.

But when users or search engines try to use the old category URL, it will no longer work. Instead, they will see a 404 Page Not Found error message.

These 404 errors create a bad user experience which can lead to a drop in search engine rankings and lower eCommerce sales.

To avoid this, you will have to set up a redirection from the old URL to the new one. Learn how to do this using our tutorial on how to track 404 pages and redirect them in WordPress.

Activate redirects in AIOSEO

It’s extremely important that you set up the 301 redirect using AIOSEO otherwise changing the category URLs could negatively impact your website search rankings.

We hope this tutorial helped you learn how to properly rename categories in WordPress. You may also want to learn how to improve your site’s SEO, or check out list of must have plugins to grow your website.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Properly Rename Categories in WordPress (Beginner’s Guide) first appeared on WPBeginner.

Categories vs Tags – SEO Best Practices for Sorting your Content

Readers often ask us, what’s better for SEO: categories vs tags?

You might not be sure what WordPress categories and tags actually are, and how they’re different. Knowing this can help you use them correctly.

In this article, we’ll explain the differences between categories vs tags for organizing your content, and how they can impact SEO rankings.

Using categories and tags for sorting content in WordPress

What’s the Difference Between Categories and Tags?

Categories are meant for broad grouping of your posts. Think of these as general topics or the table of contents for your WordPress site. Categories are hierarchical which means you can create sub-categories.

Tags are meant to describe specific details of your posts. Think of these as your site’s index words. They let you micro-categorize your content. Tags are not hierarchical.

For example, this blog post on WPBeginner is in our category “Beginners Guide”. You can see all the posts in this category by going to Blog » Beginners Guide in our navigation menu.

This post has the tags: categories, categories vs tags, custom taxonomy, seo, seo best practices, sorting your content, and tags.

You won’t see these tags displaying anywhere on our article. However, they do help users find this article in relevant searches on our blog.

One of the biggest differences between tags and categories is that all WordPress posts must be filed under a category, but they don’t have to have tags.

If you don’t give your post a category, WordPress will automatically assign it to the default category. This is called “Uncategorized”, but it’s often helpful to rename the “uncategorized” category to something like “Other” or “Miscellaneous”.

Note: By default, only blog posts have categories and tags in WordPress. However, you can add categories and tags to your WordPress pages using a plugin.

How can You Add Categories and Tags in WordPress?

You can add categories and tags in WordPress when creating or editing a post. You’ll find them on the right-hand side under the ‘Document’ settings.

Adding categories and tags when creating a post

You can also go to Posts » Categories and Posts » Tags to add new categories and tags.

For more about the process of adding categories and tags, check out our explanations of What is a category? and What is a tag? for help and guidance.

How Many WordPress Categories Should You Have?

There’s no specific number of categories that you should have. In most cases, you’ll want somewhere between 5 and 10 in order to properly categorize your posts and make your site easy to browse.

Categories are meant to encompass a large group of posts. You can use sub-categories and tags to split your posts into smaller groups.

If you’re just starting a blog, then don’t worry about trying to come up with a perfect list of categories. Just choose 3 – 5 broad categories and add more as time goes by.

Do I have to use sub-categories?

You don’t have to use sub-categories, and many large blogs (including WPBeginner) don’t. However, sub-categories are helpful if you have a large category with a lot of posts that could be grouped into smaller sections.

For example, you might have a “Recipes” category that contains a growing number of gluten-free recipes.

Posts in the category 'Recipes'

You can put these posts into their own sub-category, so it’s easy for readers to find them. You create a new child category for “Recipes” called “Gluten-Free” and move these posts into that category.

Using Categories in Your Posts’ URLs

Some sites use the Category name in permalinks (post URLs), which you can set up under Settings » Permalinks.

Including your posts' categories in your URLs

If that’s the case on your site, then your post will initially have a URL something like this:
/recipes/gluten-free-pancakes/

After moving the post to a child category, it’ll have a new URL:
/recipes/gluten-free/gluten-free-pancakes/

Normally, WordPress will try to redirect the old URL to the new one. It’s definitely worth checking that your links are still working. If necessary, you can create a 301 redirect from the old URL to the new one.

Another option is to keep the post in the parent category as well as assigning it to the child category, but this can have drawbacks.

Although, WPBeginner website has categories in the URL, we always recommend users to use shorter URL structure that only contains “Post name”.

This will give you maximum flexibility to reorganize content without worrying about setting up redirects.

All of our new websites use the modern Post name URL structure. WPBeginner is over 10 years old, so it has legacy URL structure and changing URL structure is not recommended for SEO which is why we have stuck with it.

Can I Assign One Post to Multiple Categories?

WordPress lets you put a post into multiple categories. This could be several parent categories, or a parent category plus a subcategory or subcategories.

Having multiple categories won’t benefit your SEO. You should only assign posts to multiple categories if it makes the most sense for your readers.

It’s possible that having your post in multiple categories could cause some SEO issues due to duplicate content.

If you do use multiple categories, then try to avoid putting one post into two or more main (parent) categories. Each post should fit within one main category.

Is There a Limit to How Many Tags a Post Can Have?

WordPress itself doesn’t have any limit on the number of tags you can have on each post. You could potentially assign 1,000 or more tags to a post!

However, we definitely don’t recommend that.

The purpose of tags is to help link related posts together. Think of them as an index section in a book. Each tag is like a keyword in the index.

Tags are helpful for users searching your site. Some plugins that display related posts use tags to help them figure out which posts’ topics are related.

We suggest that you normally stick to 10 tags maximum per post.

Categories vs Tags: What’s Better for SEO?

Are there any WordPress SEO advantages of using categories over tags or vice versa?

The short answer is No.

Categories and tags both have different purposes. You have to use categories, but you don’t have to use tags if you don’t want to. However, we recommend using both, appropriately, to help readers navigate your site.

Ultimately, you should design your site with users in mind. All search engines want to show users the content that’ll be the most useful to them.

This means that by organizing your content for best usability will also help you get better SEO rankings.

We hope that this article helped you understand categories vs tags and the SEO best practices for sorting your content. You may also like our article on how to track WordPress category and tag analytics, and our comparison of the best keyword research tools for SEO.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post Categories vs Tags – SEO Best Practices for Sorting your Content appeared first on WPBeginner.

How to Check if Post has Taxonomy Term

Something I did not know about when working with Custom Post Types and Custom Taxonomies. Normally when checking if a regular WP Post belongs to a specific category, we can use the WordPress function in_category(). But that does not work with Custom Post Types. To check if a CPT belongs to a specific term in a Custom Taxonomy, use has_term() instead.

Check if WP Post belongs to specific category

To check if the current post belongs to a specific category, use in_category(). For example in your theme's single.php template, you can do this:

if (in_category(1)) {
	
	// post is in category with ID = 1
	
}

Here we are checking if the post belongs to category with ID = 1. You can change that to any category ID, name or slug, or an array containing multiple values.

Here is an example where mutliple categories are checked:

if (in_category('donuts')) {
	
	// post belongs to "donuts" category
	
} elseif (in_category(array('coffee', 'beer'))) {
	
	// post belongs to either "coffee" or "beer"
	
} else {
	
	// post does not belong to any of the above categories
	
}

Notice the use of an array in the elseif condition. You can specify as many categories as needed using an array of category IDs, names, or slugs.

Check if CPT belongs to specific taxonomy term

Now for the main point of this tutorial. To check if the current post belongs to a specific term in a custom taxonomy. For example, if we have a taxonomy named download_category and want to check if the current post belongs to the term combo, we can do this:

if (has_term('combo', 'download_category')) {
	
	// post belongs to "combo" in "download_category" taxonomy
	
}

When calling has_term(), the first parameter is the name of the term, and the second parameter is the name of the taxonomy.

To check multiple terms, use an array of term IDs, names, or slugs. For example:

if (has_term(array('combo', 'book', 'deal'), 'download_category')) {
	
	// post belongs to "combo", "book", or "deal" in "download_category" taxonomy
	
}

So this example will check if the current post belongs to "combo", "book", or "deal" in the "download_category" taxonomy.

Bonus Tip: Check for *any* taxonomy term

To check if the current post belongs to any term in a given taxonomy, simply leave the first parameter empty/blank. Example:

if (has_term('', 'download_category')) {
	
	// post belongs to a term in the "download_category" taxonomy
	
}

Here we are checking if the current post belongs to any term in the "download_category" taxonomy.

That's the thick and thin of it.

Bottom line is just remember:

  • Check post for category — use in_category()
  • Check post for tax term — use has_term()

What Is Plagiarism? How to Avoid It and Cite Sources

Plagiarism, as defined by the Oxford English Dictionary, is “the action or practice of taking someone else's work, idea, etc., and passing it off as one's own.”

This includes copying and pasting text from other sources and inserting them into your own work, or even just rewording text from another source. Anything that does not reflect your own thoughts or ideas, with incorrect attributions, or a lack thereof, is an act of plagiarism.