Category and Tag Strategies in WordPress

Category and Tag Strategies in WordPress

Updated on 01/08/2023

Estimated reading time: 22 minutes

Categories and Tags in WordPress are a common topic in many discussions. They can contribute to SEO and UX a lot, but they can be a liability as well if used incorrectly. I’d like to share my perspective on them, and answer some common questions that are often arising.

We’ll start with the basics and end up on strategies that could help us deciding on how, when and why to use them.

If you are in a big hurry, switch to skimming mode by clicking the down arrow and jumping from one main point to another. If you have about 20 minutes, stick around. This is going to be useful.

What are Categories and Tags in WordPress?

Categories and Tags are Taxonomies. They are created to group post content and make navigating the website easier. While these two are the most known default taxonomies, we can create our own as well. In fact, mayn plugins have them. For example a BNB listing plugin can group properties based on location, size, number of rooms etc. Another place where they are often used are Product Categories and Product tags in WooCommerce.

In WordPress, at least one category must be added to a new post. Because of that, there is a default one called “Uncategorized”. This can be changed under Settings > Writing. Whatever the name of the default category is, it is better not to have uncategorized content at all.

Categories and Tags are actually Pages!

Surprisingly a lot of people are seeing categories and tags as some checkboxes that are supposed to do something for SEO. Before we move anywhere further, we need to make this clear: each Category and each Tag is a new URL for a brand new page created on our WordPress website. Those pages are called Archives. This is important. The archive pages are going to be indexed on Google by default and they are going to bring some traffic to the website.

Each Category and each Tag is a new URL for a new page created on a WordPress website.

Not only that: both categories and tags are going to create their separate Sitemaps generated with both SEO plugins and the default WordPress sitemap, depending which one you use.

To avoid some confusion, it is entirely possible to create custom taxonomies that do not have archive pages. It is often the case that Taxonomies are used for filtering purposes. For example, in our BNB example, it might not be useful to have a custom page that is listing all properties that have WiFi. WiFi could simply be a filtering option on the Homepage or anywhere. We’ll get to that later.

Since categories and tags are pages, we need to primarily see them as such, and make all of our decisions based on the usefulness and the purpose of their archive pages.

Categories

Categories are hierarchical. This means that we can create sub-categories under existing categories. This can be reflected in the URL structure, and show as site.com/sports/soccer, where “Sports” is the main category, and “Soccer” is a subcategory.

A good explanation would be comparing a Website to a book. For example to a Car manual. Categories are like the main section headings, topics, or chapters.

Tags

If categories are chapters, then tags are the index of terms at the end of the manual. We all love to peek at it quickly to find which pages are containing the word “Headlamp”, so we can find out what bulb to buy. It is quicker than going through the table of the contents. Tags are also non-hierarchical. We cannot nest them under each other.

If the main category was “Sports”, and the subcategory was “Soccer”, then a good tag candidates are “Leo Messi“, or “World Cup“.

Terms

With default taxonomies (categories and tags), we don’t think of individual terms. We simply click “Add new Category” or “Add new Tag”. However, each one we add is a new term. The parent taxonomy is “Categories”, and the terms are each new ones we add.

This becomes more clear when we have custom taxonomies such as “Locations” in our BNB listing: Each new location added is a new term.

How can we create our own Taxonomies?

It is quite easy, actually. One way is to add a bit of code to the functions.php file or to create a new simple plugin. Details about creating custom taxonomies are here. They can also easily be created by using an extremely popular and free plugin called CPT UI. While there is a slight learning curve to it, it is actually very simple, and most of its settings can be left at defaults.

If we are creating an entire new Custom post type, before attaching taxonomies to it we should particularly look at these settings:

  • Has Archive. This is where we decide if we want an archive page or not
  • Menu Position. This determines where the custom post type appears inside the left WP menu. Best place is usually just below posts and pages.
  • Menu Icon. This is where we can choose one of the Dashicons to represent our Taxonomy in the WP menu.

When it comes to creating custom taxonomies, we can go to CPT UI > Add/Edit Taxonomies, and add a new one. This is where we are deciding if we want to attach our new taxonomy to a default post type such as categories, tags or even media and pages, or to a custom one. One of the settings is called “Hierarchical”. If we set it to “Yes”, it is going to act as Categories, and if it is set to “No”, it is going to be like Tags: non-hierarchical.

We don’t have to rely solely on categories and tags. We can fairly easily create our own custom taxonomies using a plugin called CPT UI.

How can we make the Category and Tag pages looking good?

This is usually the first hurdle. I have seen extremely bad ways of presenting categories and tags in some themes, and even some very popular ones. Some don’t even have a title(!) meaning, no H1 title to tell the name of the category.

When we are editing an individual Category, we can notice that there is also a “Category description” field. Believe it or not, many if not most themes are not even outputting this text to the category layout. So you end up with some badly looking list of articles without any context or real use.

You may be using a locked WordPress theme, i.e. the one where you cannot change the look and feel of the Archive pages. If that is the case, and if you notice any of the above-mentioned problems, then at least demand a functions.php code from your theme author that would enable displaying the title and the description on the archive pages. You will probably have to make them look better using some custom CSS. If you are familiar with editing archive php templates, you can add/remove content yourself and keep them in the Child theme.

The ideal scenario would be to have a Theme/Builder that allows you to easily design your archive pages the way you want them, such as Pro from Themeco. I wrote an extensive review of Pro theme here, it is worth checking it out. We’ll later talk about how taxonomy pages should look like.

Category and tag archives don’t have to have a “locked” design. They can look anyway we want them. We can either hand-code the look or use a site-builder such as Pro from Themeco where we can edit Taxonomy layouts just like pages.

How to use Categories, Tags and Custom taxonomies?

This is a big question, and a popular answer is “it depends”. :)

Let us remind ourselves one more time of the fact that categories and tags are pages. They are archive pages that are collecting all the terms we are adding to them, and list them in the way our theme designers have decided to show them. Or if we are using a modern WordPress theme such as Themeco Pro, then they look exactly like we want. But the point is—they are pages. Ok, I promise I won’t be stressing this point out anymore. :)

Do we need Categories and Tags?

That’s a good first question to ask ourselves, because the answer may be “No” sometimes. It really depends if we are producing blog content that benefits from classifying it. Categories and Tags are default taxonomies attached to the native WordPress Post page we usually call “Blog”. The nature of Posts is that they are dynamic. This means we are adding new content such as news or informative articles on a regular basis.

If we don’t have a need for a Blog and if we rely solely on static Pages, then there is a chance we don’t need to classify them. But we can. We can easily add category and tag-like custom taxonomies to pages, using CPT UI.

If we are blogging, then we might have a use of categories, but there is a chance that our content has a simple structure so we don’t need tags. We are going to look into various use-cases below, to make these decisions easier.

Categories and Tags are also appearing if we have WooCommerce installed. In that case they are called Product categories and Product tags. Most shops rely at least on Product categories. They are something to take special care about, because they can impact conversion rates a lot.

When to use Categories, Tags and Custom taxonomies?

While deciding on category and tag strategies, we need to take two major factors into consideration: UX and SEO. In that order.

UX of Category and Tag lists

While SEO is guiding our website visitors during their stay on the Search engine results pages, with UX, we are thinking about our website’s visitors during their stay on the website (Further optimized by CRO, but that’s a different topic).

The better the UX, the higher the Conversion rates. The higher the Conversion rates, the higher the trust. The higher the trust, the better the SEO. That’s a closed circle. Taxonomies are one of the pillars that are playing a role in this elaborate dance.

We have used a Sports portal example above. Let’s use a general News portal now. Imaging a local news website: it churns out several posts per day, covering various local and some national topics. Let’s assume that this portal is using WordPress as is, out-of-the-box, and it relies on native taxonomies—categories and tags.

Some of the main topics that this portal is covering are “Showbusiness” “Sports” and “Politics“.

The number of key (main) topics is limited. There are perhaps a few more and that’s it. In this case, those are the perfect candidates for categories. SInce the website needs to list its key topics (categories) somehow (usually in the main navigation), it is important that there are not too many of them. A category makes sense only if it presents a uniquely distinguishable topic. Like “Sports” and “Politics“. Or “New cars” and “Used cars“. If you feel the urge to create more than five to seven categories, think again. There is a chance you might change your mind.

The fewer categories, the better. A Website should not have more categories than what it can display in a normal, clean-looking navigation. Each category should represent a topic uniquely distinguishable from others.

UX of the Category Archive pages

Did I say that I’m done stressing out the fact that categories and tags are first and foremost pages? I’ve lied. ;)

The whole point of categories (and tags) are the archive pages and the way they are presented.

In our example we have decided that “Sports” is one of our Category pages. How would an average user love to see it?

Well, for starters, the page needs to pass the 5-second-test. This means that as soon as a new visitor lands on it, he needs to understand the exact purpose of it in less than 5 seconds, and he needs to get hooked to it. If there is no title, description, some pictures, etc, it could get a very high bounce-rate and defy its purpose.

The “Sports” Category page (and most others) could contain these elements:

  • Descriptive title
  • Short and clear description
  • A Hero image (If applicable)
  • Clean and logical URL
  • Schema-tagged Breadcrumbs trail for easy navigation
  • Visible list of other categories (if applicable)
  • Featured (or the latest) article that stands out
  • A nicely presented list of articles belonging to this category, including their images
  • Call to action (If applicable)
  • Nice and clear pagination

That’s a lot, and many themes are simply not having many of those things. Perhaps if we are using a dedicated News theme, or some of those pre-determined widgetized themes, then authors may have thought of it all. But if we are relying on a simple-multipurpose theme that cannot edit Post types and taxonomies, then we have a problem. If we are using a site builder that has control of the design of the post types, then we are in business.

You may ask yourself, ok, but how can I add a unique hero image to a new category? Categories are not pages that we can edit. Sure, but we can assign Custom Fields to them. Anything that is beyond the title and the description can come from a plugin such as ACF Pro. (Pro from Themeco has ACF Pro deeply integrated, so there is no need to buy its license separately).

If we have decided to further sub-categorize the “Sports” topic, like “Soccer” and “Basketball“, then the principles are the same; all of the above elements are still present, but the clean URL and the Breadcrumbs trail is even more important: site.com/sports/soccer/article/.

There is one more good reason to avoid the flat structure: Analytics content drilldown. If we have such a tree-structure, we can do a much better job when analyzing the traffic by segmenting it to various branches of the website’s tree.

Category archive pages need to look like proper landing pages. We can easily add more elements to them, such as hero images, using Custom Fields.

Can a post have more than one category?

Sure. But I wouldn’t do that. Site visitors want clear and understandable way to navigate around websites. If they are browsing one topic, the last thing they want to see are the same articles in some other topics. it is simply a bad UX. Besides, if we did a good job to have only the clearly distinguishable topics as categories, that wouldn’t even be possible. A car is either new or used. It can’t be both.

Furthermore, what permalink structure do we use? In WooCommerce, it is set to /product/sample-product/ by default. My opinion is that this structure is good only if our web shop is the website’s homepage. It is more common for a website to have a separate shop page, in which case the best structure is /shop/sample-product/.   

Even better structure for good UX and better breadcrumbs is “Shop base with category”: /shop/product-category/sample-product/. Most shop owners choose this, and it is a great choice. However, they often have multiple categories per post, which makes the issue a bit tricky.

WooCommerce Demo shop has a product called Hoodie with Zipper. It is placed under this sub-category:

/shop/clothing/hoodies/hoodie-with-zipper/

But what happens if we add it to the Tshirt category as well?

A product with multiple (sub)categories

Now the same product will appear under two different URLs!

/shop/clothing/hoodies/hoodie-with-zipper/

and

/shop/clothing/tshirts/hoodie-with-zipper/

In this case, SEO plugins will self-canonicalize both products. So, we are creating 100% duplicate content. Google does not penalize websites for this, but it’s still a mess and a confusion both for user experience, analytics, and we could go on.

Generally speaking, there should be one category per each post.

Removing the /category/ or /tag/ base from the URL

This is easy to do, but we need to be very cautious if we’re doing it on an existing website. There are two things to consider: redirections and duplications.

As with all URLs, changing Category or tag URLs leave 404 errors. If an old URL version is indexed on Google or linked externally or internally, it is going to lead to a 404 “Page not found” error page. This means we need to place proper redirects from the old to the new URLs.

The second thing to think of is this: imagine we have a tag page site.com/blog/category/something/.

Website could also have this post, at the same time: site.com/blog/something/ .

Removing the /category/ base would lead to the conflict with the existing post, or product or whatever. For this reason we need to make sure nothing like this would happen.

On brand new websites, it is much easier to plan ahead, but on old website we need to be very cautious. The best thing to do first is to crawl the website and analyze the results.

Should we remove the category or tag URL base?

As with everything, it depends on what we want and what would best serve the users. It makes more sense to do it with categories than tags, but everyone has to decide for himself.

Don’t forget that any URL used as a taxonomy goes into a separate sitemap and we cannot use it again for the page, post or product. This is not necessarily a bad thing, but if you’re noindexing tags for example, that would be a waste. Just make sure to have a good plan and the reason for everytihg.

How to remove the category or tag URL base?

You could use a plugin or write code, but the easiest way is to head to Settings > Permalinks > Optional > Category (or Tag) Base.

To remove the Category base from URLs, just enter a dot into the Category base filed. The same goes for the tag base.

Removing the category/tag base by entering a dot.

That’s it. Taxonomy base is now gone.

UX of the Tag Archive pages

Now, the Tags are very interesting, and heavily underestimated by many. We’ll talk more about them in the SEO department, but let’s touch up a bit on their UX.

Most websites have exactly the same archive pages for tags, as they have for categories. This is perfectly OK in many cases. In the WordPress template hierarchy, there should be a default (archive.php) Layout for all archives. But some extra archive layouts should be present as well to override the main one as needed.

Let me explain.

It was easy to devote time to designing nice custom layouts for Categories. There are only a few of them. Even with sub-categories, the number is limited.

But there could be hundreds of tags. Even thousands! It is not realistic to give the same level of attention to each of them. Unique description, special Hero image… you know.

Let’s find a good example of a tag page… I know: “US elections“! That’s a good tag. So our US Local news portal has a Category page called “Politics“. Elections are happening once in four years, so it doesn’t seem they fit to be a sub-category. If there are subcategories of the “Politics” category, they are more likely some general things like “Local politics” “National politics” and “International politics”, or something like that. But “US Elections” is just one of the many politics topics. As such, they perfectly fit to be a tag. But not all tags are equal.

“Us Elections” is an important topic that can house many different articles. Every four years it is about a different or a re elected president, it is about various presidential promises etc. So as an important topic, this particular term (tag) can receive some custom design. I would assign our nice layout to it, write the description, select the featured post maybe, create a nice hero picture etc. We want the “US Elections” tag to look like a real page devoted to the US elections topic. It lists all the articles on our portal that are covering it.

All the articles on it have a single category of “Politics” and a more precise common denominator, which is the “US Elections” tag. Since posts can have as many tags as we want, we will use some additional tags that also make sense, like “Joe Biden“, “US Elections 2021” etc. It also can have a tag about current statistics on how each of the candidates are standing, etc.

Obviously, some of those tags don’t need an all-dressed-up tag archive page assigned to the tag.php template. They can use the inherited generic archive.php template that relies on automatic fields like the title, featured latest posts, List of articles etc. When we create the top-level archive.php template, we shouldn’t be using any of the custom stuff added by ACF. It should look great automatically using what it can from native WordPress.

The description field is native, but it might be empty. For it, I would add a condition for it to show up only if the description field is not empty. Pro from Themeco has these kinds of conditions where we can easily decide how and when each part of the page or layout is outputted. If there is no image, there won’t be a broken image icon. If there is no description, there won’t be an awkward empty space.

We can have multiple layouts for tags. If the tag term is important, such as “US Elections” on a News website, we can have a complex layout with additional text and media. If it is a simple tag solely for classification purposes, then it can have a generic, automated design.

How many tags a post should have?

It is vital not to add a bunch of tags that are not going to be good landing pages. Remember: tags are pages. They are not keywords, or checkboxes. :) If there is going to be a single tag page with some insignificant term, it is not going to be useful to anyone.

Some would say “don’t use tags if you don’t plan to have at least a few articles using them“. This leans towards being true in most cases. Some SEO plugins even have an option to hide a tag archive until it has more than a set amount of tags. It is not universal, however… Do you remember the index at the back of the car’s printed manual: sometimes there are terms that are very important, but used only once or twice. Sometimes showing those archives still makes sense.

If the tag is used only once, an ideal UX might be to immediately redirect it to the location (and anchor it to the section) where it is used. That would probably be an overkill, but still, just sayin’.

A post can have as many tags as needed, as long as they are meaningful terms someone would look up, and not something that is never going to be used again. If the tag is very important, it could be used even if it is going to be used only once.

SEO impact of Category and Tag pages

Do I need to noindex categories and tags?” Too often asked question it is. [Insert Yoda meme here] :).

If you have read the above carefully, you don’t even need the answer anymore. I mean, you are presenting taxonomies as proper landing pages. You are carefully planning which ones to chose and when to use them. You are thinking first and foremost about UX, so as a result, you don’t have thin content on your website. Of course you are going to index them.

Our News portal from the above example wants to rank for the keyword “US Elections”. Is it going to have a special, dedicated article about them? Well, maybe. But this is a broad topic, covering lots of articles talking about it. So which of all those articles will rank the best for the term? Do others actually dilute the ranking power of the one we are trying to rank, for this keyphrase?

Lots of questions. But we have a great “US Elections” Tag page. It has a nice description or even a longer-form, relevant content, a proper title, It is dynamic, we have added Schema to it, it has a whole tree of “US Elections” based articles linked and back-linked, we have crafted a Meta title and the description for it… Hmmm, it should be obvious by now: Tags are perfect for SEO.

They are perfect as long as we treat them UX-first, as it is with many other SEO related things. :)

Other tags may not be SEO relevant so much, so we can use the more generic, default archive layout for them, inherited from the archive.php template. We could even noindex individual tags that make no added value on SERPs. If we are indexing them, we have to make sure they have received useful meta title and the tescription. Perhaps even a dedicated OG image for sharing purposes.

If categories and tags are properly used, they should be indexed. Tags are often underrated. They can act like powerful organic landing pages and give a significant boost to our SEO efforts. The prerequisite for that is that they actually look like useful landing pages, and not generic lists like many themes are presenting them.

Conclusion

We have seen that Categories and tags in WordPress are real pages that need to be taken care of. They can assume a look of real landing pages and serve as a fantastic boosters both for UX and SEO. Once most of their UX elements are covered, they automatically become great for SEO, with a few additional tweaks concerning Metas, Schema etc.

I hope this article has helped you to think critically about default and custom taxonomies, and I hope it will help you in making the Internet a better place.

Until the next article. See you soon!

Like the article?
Share it with the World!


Miroslav Misho Meduric

About the Author

Miroslav Misho Meduric


Miroslav is a digital marketer certified by Google and several more authorities. He is also an Executive MBA. As a co-fonder of WPUsability he is behind several successful SEO campaigns and web projects.

Join in on the discussion!


Leave a Reply

There are currently no comments. Why don't you kick things off?