RS Bloggers

How to Create Custom Taxonomy WordPress – Beginner’s Guide

What is a Custom Taxonomy in WordPress?

WordPress gives you built-in ways to group content — like categories and tags. But sometimes, that’s not enough.

Let’s say you run a book review website. You might want to group books by genre, author, or publisher. That’s where custom taxonomies come in. They let you create your own labeling system to group posts or custom post types exactly how you need.

Why Use Custom Taxonomies?

Here are a few reasons why custom taxonomies are powerful:

  • They give your site structure and clarity.

  • Users can find content faster through filters or menus.

  • Google and other search engines love organized content — so your SEO improves too!

How to Create a Custom Taxonomy Using Code

If you’re comfortable editing your theme files, you can add a custom taxonomy with a few lines of code.

Open your theme’s functions.php file and paste the following:

<?php
function register_book_genre_taxonomy() {
  register_taxonomy(
    'genre',
    'books',
    array(
      'label' => 'Genres',
      'hierarchical' => true,
      'public' => true,
      'rewrite' => array('slug' => 'genre'),
      'show_admin_column' => true,
    )
  );
}
add_action('init', 'register_book_genre_taxonomy');

This code:

  • Registers a new taxonomy called “Genres”.

  • Links it to a custom post type called “Books”.

  • Displays it in your WordPress admin menu.

Tip: If you’re not using a custom post type, you can replace 'books' with 'post'.

Don’t Like Code? Use a Plugin Instead

If coding isn’t your thing, no worries! Use the Custom Post Type UI plugin.

Here’s how:

  1. Install the plugin from Plugins > Add New.

  2. Go to CPT UI > Add/Edit Taxonomies.

  3. Add a slug (like genre) and name your taxonomy.

  4. Assign it to any post type you want — even regular blog posts.

  5. Click Add Taxonomy.

You’ll now see your custom taxonomy in the dashboard sidebar.

Final Thoughts

Creating a custom taxonomy in WordPress helps you take full control of your content structure. Whether you’re building a recipe site, a portfolio, or a product catalog — custom taxonomies make your content easier to manage and easier for users to explore.

Start with a plugin if you’re a beginner, or use code if you’re comfortable editing files. Either way, you’re building a smarter, more SEO-friendly WordPress site.