WordPress Custom Taxonomy Generator

Generate register_taxonomy() code with Basic and Advanced options — copy/paste or download a ready PHP snippet.
All Tools
Tags / Categories • REST • Rewrite • Copy & Download
Used for labels like “Add New Genre”.
Used for menu labels like “Genres”.
Lowercase + underscores. This becomes the taxonomy key.
Comma-separated post types (e.g. post, page, book).
Hierarchical taxonomies support parent/child terms.
Recommended for Gutenberg & REST endpoints.
URLs like /genre/sci-fi.

Where to paste: functions.php (child theme recommended) or a small custom plugin file. After adding/updating taxonomies, go to Settings → Permalinks → Save to flush rewrite rules.

Generate WordPress custom taxonomy code instantly

A WordPress custom taxonomy helps you organize content using custom categories and custom tags. Use this generator to create clean register_taxonomy() code for taxonomies like Genres, Brands, Locations, Topics, and Skills. Choose hierarchical taxonomies (category-style) or non-hierarchical taxonomies (tag-style), attach them to any post type, and enable REST API for Gutenberg.

Basic mode is perfect for quick setup. Advanced mode gives full control over labels, rewrite rules, admin columns, and visibility flags.

Common taxonomy examples

  • Genre taxonomy for a “Books” custom post type
  • Brand taxonomy for a “Products” catalog
  • Location taxonomy for “Properties” or “Events”
  • Skill taxonomy for “Team Members” or “Jobs”
  • Topic taxonomy for “Courses” or “Resources”

Frequently Asked Questions (FAQ)

1. What is a custom taxonomy in WordPress?

A custom taxonomy is a classification system you add to WordPress to group content, similar to categories or tags.

2. What is the difference between hierarchical and non-hierarchical taxonomies?

Hierarchical taxonomies behave like categories (parent/child). Non-hierarchical behave like tags (flat structure).

3. Can I attach one taxonomy to multiple post types?

Yes. Provide multiple post type slugs separated by commas (example: post, product, book).

4. Do I need show_in_rest enabled?

Yes for Gutenberg support and REST API usage. Disable only if you need a classic-only setup.

5. Why aren’t my term URLs working?

After adding or changing rewrite slugs, flush permalinks by saving Settings → Permalinks.

6. What does show_admin_column do?

It adds a taxonomy column in the post list table to quickly see assigned terms.

7. Can I rename labels later?

Yes. Update the labels array and refresh admin screens. This does not change existing term data.

8. Can I use the same rewrite slug as another taxonomy?

Avoid conflicts. Unique rewrite slugs prevent routing issues and unexpected URL behavior.

9. Will a taxonomy affect performance?

Not significantly by itself. Performance depends on query complexity and term counts.

10. Where should I put taxonomy registration code?

In a child theme functions.php or a small plugin, especially if the taxonomy is essential site structure.

Quick tips
  • Use hierarchical = true for categories like “Genre → Sci-Fi → Space Opera”.
  • Enable show_admin_column to speed up content management.
  • Flush permalinks after changing rewrite slugs.
Safety note
This generator runs locally and does not store inputs or call external APIs.