Skip to main content

How Do I Use Taxonomy In WordPress?

by
Last updated on 3 min read

Quick Fix Summary

Fire up the Custom Post Type UI plugin in WordPress. Head to CPT UI → Add/Edit Taxonomies, set up your taxonomy (say, "Product Categories"), then save. Your new taxonomy shows up under Posts or whatever custom post type you picked.

What's Happening

WordPress taxonomies group content by shared traits—kind of like built-in categories and tags, but you can tweak them however you like. They can stack hierarchically (parent/child) or sit flat like tags. You can hook them onto regular posts, custom post types, or even links. WordPress 6.6+ (yes, even as of 2026) bakes in fancier taxonomy features, so they’re perfect for big, messy sites. Picture an online store slotting products into a "Product Type" taxonomy by size, color, or whatever makes sense.

The WordPress Developer Handbook spells it out: taxonomies get registered with register_taxonomy(), letting you stretch core features without breaking a sweat.

Step-by-Step Solution

  1. Install and activate the Custom Post Type UI plugin
    • Jump into your WordPress dashboard, then hit Plugins → Add New.
    • Search for Custom Post Type UI by WebDevStudios, install it, then flip the switch to activate.
  2. Create a new taxonomy
    • In the admin sidebar, cruise over to CPT UI → Add/Edit Taxonomies.
    • Under Taxonomy Settings, drop in a Plural Label ("Product Categories") and a Singular Label ("Product Category").
    • Pick the Taxonomy Type: stick with Post for standard posts or switch to Custom Post Type if you’re targeting something like "Products."
    • Toggle Hierarchical if you want parent/child nesting, and make sure Public is on so visitors can see it.
  3. Save and verify
    • Hit Save Taxonomy at the bottom.
    • Peek at your WordPress admin sidebar. Your shiny new taxonomy should show up under Posts or the linked custom post type.
    • Open an existing post or spin up a fresh one. The taxonomy field will pop up in the editor, ready for action.

If This Didn’t Work

Your taxonomy vanished after saving? Let’s hunt down the culprit.

  • Check plugin conflicts
    • Turn off other plugins one by one—start with anything that messes with post types or taxonomies (WooCommerce, Advanced Custom Fields, etc.).
  • Clear caches
    • Empty caches in your caching plugin (WP Rocket, LiteSpeed Cache, etc.).
    • Flush CDN and server caches too (Cloudflare, Varnish—whatever’s in play).
  • Manually register the taxonomy
    • Toss this snippet into your theme’s functions.php or a custom plugin. Swap product_category and product with your own slugs:
      function register_custom_product_taxonomy() { $args = array( 'label' => 'Product Categories', 'hierarchical' => true, 'public' => true, ); register_taxonomy('product_category', 'product', $args); } add_action('init', 'register_custom_product_taxonomy');
    • Save the file, refresh your WordPress admin, and your taxonomy should reappear like magic.

Prevention Tips

Keep custom taxonomies from turning into a headache down the road with these habits.

  • Use unique slugs
    • Pick a taxonomy slug (e.g., product_category) that won’t brawl with other plugins or themes.
  • Document changes
    • Jot down every custom taxonomy and post type in a shared doc or project tracker—future-you will thank you.
  • Update plugins regularly
    • Keep Custom Post Type UI and WordPress updated so nothing grinds to a halt.
  • Backup before making changes
    • Run a full site backup with UpdraftPlus or your host’s tools before touching taxonomies or code.
Edited and fact-checked by the TechFactsHub editorial team.
Maya Patel

Maya Patel is a software specialist and former UX designer who believes technology should just work. She's been writing step-by-step guides since the iPhone 4, and she still gets genuinely excited when she finds a keyboard shortcut that saves three seconds.