Writers Building Websites

Writers Building Websites

Create a Custom Genre Taxonomy in WordPress for Authors

In this lesson, learn how to create and associate custom taxonomies in WordPress to better organise books for authors. Enhance book discoverability for readers and search engines.

Last Updated: 10 December 2024

Introduction

If you are an author who only writes standalone novels in a single genre this lesson is for you. Sure, that’s what you do now but what happens when critics hail the protagonist of your psychological horror as the next big thing in detective thrillers! How are you going to update the books on your website with this new information to make it easy for visitors to find them?

Fear not! Custom Taxonomies have got you covered.

What are taxonomies?

In WordPress, taxonomies are a way to group posts together based on a common characteristic. They are used to organise content. There are two built-in taxonomies in WordPress.

  • The first are Categories. These are hierarchical, meaning you can create sub-categories. They are generally used for broad groupings of posts.
  • Next we have Tags. These are non-hierarchical, meaning there are no parent-child relationships. Tags are generally used for more specific topics that are discussed in a post.

Why do authors need custom taxonomies?

Custom taxonomies for custom post types are essential because they provide a flexible and organised way to categorise and manage the content specific to your website’s needs. In this course we are going to use custom taxonomies to better organise the Books we publish to the Dirk Volcano website.

We are going to create two custom taxonomies for our Books custom post type. 

A Genre taxonomy.

And a Series taxonomy.

These custom taxonomies will better organise the books on Dirk’s website making it easier for readers and search engines to find them.

Create the GENRE Taxonomy

To create our first Taxonomy we will go from the WordPress admin dashboard to ACF then Taxonomies.

  • Click on the +Add Taxonomy button
  • The PLURAL LABEL is Genres
  • The Singular LABEL is Genre
  • The TAXONOMY KEY is genres
  • Set POST TYPE to Book
  • This Taxonomy is PUBLIC
  • Click SAVE CHANGES

When I hover over the BOOKS icon in the admin side bar we now have a Genres item listed there.

When I click on GENRES we are taken to the GENRE management screen. From here I can add the two genres with the descriptions I want for the Dirk Volcano site.

  • Thriller.
    • Thriller books are fast-paced and suspenseful. Dylan Danger thrillers feature a fearless detective facing twists, dark secrets, and high-stakes adversaries.
  • Cozy Mystery.
    • Cozy Mystery books are lighthearted and charming. The Village Detective novels feature an amateur sleuth solving quaint, local mysteries with wit and warmth.

Update the Book

When I edit the Adventure Danger Book Post we now have a new meta box for our Genres. I’ll enter the first few letters of Thriller until it appears as a choice and click on the full word when it appears to add it.

I’ll save the draft and we have updated our Book post with a genre.

Summary

In this lesson we created and associated a custom taxonomy for, and to, our Books Custom Post Type. This custom taxonomy helps better organise our books making it easier for readers and search engines to find them. 

Custom taxonomies are incredibly flexible, able to adapt to any author regardless of genre, publishing choices or marketing strategy.

Stephen Gordon
Stephen is the founder of Writers Building Websites and brings over a decade of experience as a freelance marketer specialising in publishing. He is also an author.

Index

Copyright © 2024 Writers Building Websites | All Rights Reserved.