[Atomic Glue](atomicglue.co)
CMS
Home › Glossary › Cms· 408 ·

Taxonomies

tak-son-oh-meeznoun
Filed underCmsSoftware Engineering
In brief · quick answer

Taxonomies in WordPress are classification systems for organizing content. The built-in taxonomies are Categories (hierarchical) and Tags (non-hierarchical). Custom taxonomies extend this to any classification scheme, like 'Genre' for music posts, 'Location' for property listings, or 'Department' for team members.

§ 1 Definition

Taxonomies are the mechanism WordPress uses to group and classify content. They're the organizational layer that connects related content across your site, making it navigable for users and understandable for search engines. WordPress ships with two default taxonomies: - Categories: Hierarchical. Can have parent/child relationships (e.g., 'Technology' with child 'WordPress'). Mainly used for broad content organization. - Tags: Non-hierarchical (flat). Used for specific, descriptive keywords. No parent/child structure. Custom Taxonomies extend this system. A book review site might add a 'Genre' taxonomy (hierarchical: Fiction > Science Fiction, Non-Fiction > History) linked to its 'Book' Custom Post Type. A real estate site might add 'Property Type' (House, Apartment, Condo) and 'Neighborhood' as custom taxonomies. Taxonomies are registered using the `register_taxonomy()` function and can be linked to one or more post types. They appear in the WordPress admin as meta boxes in the post editor, and their archive pages are automatically generated following the Template Hierarchy.

§ 2 Hierarchical vs Non-Hierarchical Taxonomies

The choice between hierarchical and non-hierarchical depends on how you want to structure your content: Hierarchical taxonomies (like Categories): - Have parent/child relationships - Displayed as a checkbox list or dropdown (depending on your theme) - Used for broad organizational structures: Departments, Genres, Locations, Product Categories - Archive URLs reflect hierarchy: `/genre/fiction/science-fiction/` - Better for structured navigation and breadcrumbs Non-hierarchical taxonomies (like Tags): - No parent/child relationships - Displayed as a tag cloud or text input - Used for specific descriptors: Skills, Features, Mood, Color - Archive URLs are flat: `/skill/react/` - Better for cross-linking related content across categories You can mix both. An article about React performance might be in the 'Programming' category (hierarchical) with tags for 'React,' 'JavaScript,' and 'Performance' (non-hierarchical). This gives you both broad navigation and specific topic filtering.

§ 3 Registering Custom Taxonomies

Custom taxonomies are registered with `register_taxonomy()` and linked to specific post types. Best practice: register taxonomies in a custom plugin alongside your Custom Post Types, not in your theme's `functions.php`.

§ 4 Taxonomy Template Hierarchy

WordPress resolves taxonomy archive pages through a specific template hierarchy: 1. `taxonomy-{taxonomy}-{term}.php` (e.g., `taxonomy-genre-science-fiction.php` for a specific term) 2. `taxonomy-{taxonomy}.php` (e.g., `taxonomy-genre.php` for all genre archives) 3. `taxonomy.php` (generic fallback for any taxonomy) 4. `archive.php` (fallback for any archive) 5. `index.php` (final fallback) This hierarchy gives you fine-grained control. You can style a 'Featured Properties' taxonomy archive differently from a 'Foreclosure' taxonomy archive, or apply a unified design to all taxonomy archives. For SEO, taxonomy archives can be powerful landing pages. A well-structured taxonomy system creates content clusters that search engines understand. A 'WordPress SEO' tag page with 20 articles linked internally signals topical authority better than 20 unrelated blog posts.

§ 5 In code

// Register a custom 'genre' taxonomy for the 'book' CPT
function ag_register_genre_taxonomy() {
    $args = array(
        'labels' => array(
            'name' => 'Genres',
            'singular_name' => 'Genre',
            'add_new_item' => 'Add New Genre',
        ),
        'public' => true,
        'hierarchical' => true, // Like categories (parent/child)
        'rewrite' => array('slug' => 'genre'),
        'show_in_rest' => true, // Enable Gutenberg support
    );
    register_taxonomy('genre', 'book', $args);
}
add_action('init', 'ag_register_genre_taxonomy');

§ 6 Common questions

Q. What's the difference between a taxonomy and a custom field?
A. A taxonomy groups content across your site (all posts tagged 'WordPress'). A custom field stores metadata about a single post (e.g., 'price: $29'). Taxonomies create relationships between posts. Custom fields describe a post in isolation.
Q. How many taxonomies can I have?
A. There's no hard limit. Practically, most sites need 1-5 taxonomies. Too many taxonomies create admin complexity and dilute content relationships.
Q. Can a taxonomy be linked to multiple post types?
A. Yes. A 'Featured' taxonomy could organize both 'Products' and 'Case Studies' under the same 'Featured' vs 'Standard' classification.
Key takeaways
  • Taxonomies are WordPress's content classification system. Categories (hierarchical) and Tags (flat) are the defaults.
  • Custom taxonomies extend this to any organizational scheme: Genres, Locations, Departments, Skills.
  • Taxonomies create content relationships that improve navigation, user experience, and SEO.
  • Register taxonomies in a plugin alongside your CPTs, and use the template hierarchy for custom archive designs.
How Atomic Glue helps

We design taxonomy systems that organize content effectively for both users and search engines. Combined with custom post types, we build structured content architectures that make WordPress sites manageable and discoverable. Get in touch.

Get in touch
# Taxonomies

Taxonomies in WordPress are classification systems for organizing content. The built-in taxonomies are Categories (hierarchical) and Tags (non-hierarchical). Custom taxonomies extend this to any classification scheme, like 'Genre' for music posts, 'Location' for property listings, or 'Department' for team members.

Category: Cms (also: Software Engineering)

Author: Atomic Glue Editorial Team

## Definition

Taxonomies are the mechanism WordPress uses to group and classify content. They're the organizational layer that connects related content across your site, making it navigable for users and understandable for search engines. WordPress ships with two default taxonomies: - **Categories:** Hierarchical. Can have parent/child relationships (e.g., 'Technology' with child 'WordPress'). Mainly used for broad content organization. - **Tags:** Non-hierarchical (flat). Used for specific, descriptive keywords. No parent/child structure. [Custom Taxonomies](/glossary/custom-post-types) extend this system. A book review site might add a 'Genre' taxonomy (hierarchical: Fiction > Science Fiction, Non-Fiction > History) linked to its 'Book' [Custom Post Type](/glossary/custom-post-types). A real estate site might add 'Property Type' (House, Apartment, Condo) and 'Neighborhood' as custom taxonomies. Taxonomies are registered using the `register_taxonomy()` function and can be linked to one or more post types. They appear in the WordPress admin as meta boxes in the post editor, and their archive pages are automatically generated following the [Template Hierarchy](/glossary/template-hierarchy).

## Hierarchical vs Non-Hierarchical Taxonomies

The choice between hierarchical and non-hierarchical depends on how you want to structure your content: **Hierarchical taxonomies (like Categories):** - Have parent/child relationships - Displayed as a checkbox list or dropdown (depending on your theme) - Used for broad organizational structures: Departments, Genres, Locations, Product Categories - Archive URLs reflect hierarchy: `/genre/fiction/science-fiction/` - Better for structured navigation and breadcrumbs **Non-hierarchical taxonomies (like Tags):** - No parent/child relationships - Displayed as a tag cloud or text input - Used for specific descriptors: Skills, Features, Mood, Color - Archive URLs are flat: `/skill/react/` - Better for cross-linking related content across categories You can mix both. An article about React performance might be in the 'Programming' category (hierarchical) with tags for 'React,' 'JavaScript,' and 'Performance' (non-hierarchical). This gives you both broad navigation and specific topic filtering.

## Registering Custom Taxonomies

Custom taxonomies are registered with `register_taxonomy()` and linked to specific post types. Best practice: register taxonomies in a custom plugin alongside your [Custom Post Types](/glossary/custom-post-types), not in your theme's `functions.php`.

## Taxonomy Template Hierarchy

WordPress resolves taxonomy archive pages through a specific template hierarchy: 1. `taxonomy-{taxonomy}-{term}.php` (e.g., `taxonomy-genre-science-fiction.php` for a specific term) 2. `taxonomy-{taxonomy}.php` (e.g., `taxonomy-genre.php` for all genre archives) 3. `taxonomy.php` (generic fallback for any taxonomy) 4. `archive.php` (fallback for any archive) 5. `index.php` (final fallback) This hierarchy gives you fine-grained control. You can style a 'Featured Properties' taxonomy archive differently from a 'Foreclosure' taxonomy archive, or apply a unified design to all taxonomy archives. For SEO, taxonomy archives can be powerful landing pages. A well-structured taxonomy system creates content clusters that search engines understand. A 'WordPress SEO' tag page with 20 articles linked internally signals topical authority better than 20 unrelated blog posts.

## In code

// Register a custom 'genre' taxonomy for the 'book' CPT
function ag_register_genre_taxonomy() {
    $args = array(
        'labels' => array(
            'name' => 'Genres',
            'singular_name' => 'Genre',
            'add_new_item' => 'Add New Genre',
        ),
        'public' => true,
        'hierarchical' => true, // Like categories (parent/child)
        'rewrite' => array('slug' => 'genre'),
        'show_in_rest' => true, // Enable Gutenberg support
    );
    register_taxonomy('genre', 'book', $args);
}
add_action('init', 'ag_register_genre_taxonomy');

## Common questions

Q: What's the difference between a taxonomy and a custom field?

A: A taxonomy groups content across your site (all posts tagged 'WordPress'). A custom field stores metadata about a single post (e.g., 'price: $29'). Taxonomies create relationships between posts. Custom fields describe a post in isolation.

Q: How many taxonomies can I have?

A: There's no hard limit. Practically, most sites need 1-5 taxonomies. Too many taxonomies create admin complexity and dilute content relationships.

Q: Can a taxonomy be linked to multiple post types?

A: Yes. A 'Featured' taxonomy could organize both 'Products' and 'Case Studies' under the same 'Featured' vs 'Standard' classification.

## Key takeaways

## Related entries


Last updated July 2025. Permalink: atomicglue.co/glossary/taxonomies

Schedule a call

30 min · Video call

1
Date
2
Time
3
Details