Quick answer: A taxonomy in WordPress is a way of grouping content. WordPress comes with two for posts: categories, which are broad and can be nested, and tags, which are loose labels with no hierarchy. You can also register custom taxonomies, such as “Location” or “Service type”, for posts or custom post types. Plan them before you add content, keep each one focused on a single question, and avoid creating hundreds of thin tag pages that compete with your real content.
Taxonomies sound technical, but they shape how visitors browse your site, how your URLs look and how search engines understand your content. A little planning saves a lot of tidying up later.
What a taxonomy is
Each taxonomy is a set of terms. Each term can be attached to many posts, and each post can have many terms. WordPress stores this in three database tables (terms, term_taxonomy and term_relationships), which is why the same system works for categories, tags and anything custom you add.
Every term gets its own archive page listing the content assigned to it. That is useful for visitors and, handled carefully, for search.
Categories
Categories are the main sections of your blog.
- Hierarchical: a category can have child categories, such as “Marketing” with “Email” and “Social” underneath.
- Required: every post has at least one. If you do not choose, WordPress assigns the default, which starts out as “Uncategorized”. Rename that to something useful.
- Broad: aim for a small set, often five to ten, that cover your main topics.
Good categories answer the question “what section of the site does this belong to?” They often mirror your services or your audience’s main interests.
Tags
Tags are free form labels for specific details.
- Flat: no parent and child relationships.
- Optional: a post can have none.
- Specific: names of products, places, people or narrow topics that appear across categories.
The common problem with tags is overuse. Ten new tags on every post soon leaves you with hundreds of tag archives, most showing one or two posts. Those pages offer little value and dilute your site in search. A shorter, controlled list of tags that you reuse is far more useful.
Categories or tags?
A simple test:
- If the grouping is a main section a visitor would choose from a menu, it is a category.
- If it is a detail that cuts across sections and will be used many times, it is a tag.
- If it will only ever apply to one or two posts, it probably should not exist at all.
Do not create a tag with the same name as a category. The two archives will compete for the same searches.
Custom taxonomies
Sometimes neither categories nor tags fit. A recipe site might want “Cuisine” and “Diet”. A property site might want “Area” and “Property type”. An events site might want “Venue”. These are custom taxonomies.
When to create one
- You need to filter or browse by a specific attribute.
- The attribute applies to a custom post type, such as products, case studies or properties.
- Mixing it into categories would make the category list confusing.
How they are registered
Custom taxonomies are registered in code with the register_taxonomy() function, usually in a plugin or in the theme’s functions file. The main settings include:
- Labels, which control how the taxonomy is named in the admin.
- Hierarchical, true for category style, false for tag style.
- Rewrite, which sets the URL slug, such as
/area/london/. - Show admin column, which adds a column to the post list screen.
If you prefer not to write code, plugins such as Custom Post Type UI and Pods provide a settings screen. We generally recommend putting taxonomies in a small site specific plugin rather than in the theme. If you change themes later, a taxonomy registered in the theme disappears, and so do its archive pages.
Term meta
Since WordPress 4.4, terms can store their own metadata, in the same way posts have custom fields. This means you can attach an image, colour or extra description to a category or custom term without workarounds. It opens up better designed archive pages, such as an area page with its own header image and introduction.
Displaying taxonomies in your theme
WordPress looks for specific template files to display archives, following the template hierarchy. For a custom taxonomy called “area”, it will look for taxonomy-area-london.php, then taxonomy-area.php, then taxonomy.php, and finally archive.php and index.php. Categories and tags have their own equivalents. Our guide to the WordPress template hierarchy explains the full order.
Useful template functions include:
the_terms()to list the terms attached to a post.get_the_terms()to retrieve them for custom output.term_description()to show the description on an archive page.tax_queryinWP_Queryto pull posts that match one or more terms.
Taxonomies and SEO
Archive pages can help or hurt.
Make archives worth visiting
A category page that is just a list of headlines is thin. Add an introduction in the term description explaining what the section covers. Many themes show it at the top of the archive. With term meta, you can go further.
Avoid thin archives
Tag pages with one post, author archives on a single author site, and date archives rarely add value. SEO plugins such as Yoast SEO let you set these to noindex, which keeps them available for visitors but out of search results.
Keep URLs clean
Choose short, readable taxonomy slugs. Decide early whether category bases such as /category/ should stay in URLs, because changing it later means setting up redirects.
Do not double up
If a category, a tag and a custom term all describe the same thing, pick one and merge the others. Redirect the old archive URLs to the one you keep.
Planning your taxonomies
Before you build, write out:
- The main sections visitors expect, which become categories.
- Specific details that cut across sections, which may become tags.
- Attributes you will filter or browse by, which may need custom taxonomies.
- Which post types each taxonomy applies to.
- The URL slug for each.
For an existing site, export a list of your categories and tags with post counts. Merge near duplicates, delete unused terms and redirect any archive URLs that had traffic. It is unglamorous work but makes a real difference to how organised the site feels.
Common mistakes
- Leaving “Uncategorized” as the default. It looks unfinished.
- Too many categories. If the menu needs a scroll bar, it is too long.
- Tag sprawl. Hundreds of single use tags.
- Taxonomies in the theme. They vanish when the theme changes.
- No descriptions. Archive pages with no context for visitors or search engines.
FAQ
Can a post be in more than one category?
Yes. But keep it to one main category where you can, as it makes the structure clearer and avoids confusing breadcrumbs.
Can pages have categories?
Not by default. A small amount of code or a plugin can add categories or a custom taxonomy to pages.
Will renaming a category break links?
Renaming the label is fine. Changing the slug changes the archive URL, so add a redirect from the old one.
Need a site structure that scales?
We plan content structures, build custom taxonomies and tidy up overgrown archives on WordPress sites. See how we help businesses turn visitors into customers with sites that are easy to browse.