Organizing your content is one of the core features of a content-management system (CMS) like WordPress. As such, WordPress contains “taxonomies” to help you keep your content easy to find for both you and your visitors. Today we’re focused on why and how to make a WordPress custom taxonomy.
Even if the term “taxonomy” is new, WordPress’s two default taxonomies—“categories” and “tags”— should be familiar. WordPress custom taxonomies are similar to these default taxonomies in that they organize things. The difference is that they can be anything you choose, from “Difficulty” to “Product Type.” We’ll start this article by explaining a bit more about taxonomies, and then we’ll get detailed about how and why to create your own WordPress custom taxonomies.
Before we dive in, an invitation. If you’re looking to more deeply understand WordPress’s data structures—and WordPress development in general—we’ve written the best guide out there:
The Best Way to Learn WordPress Development
Up and Running is our complete “learn WordPress development” course. Now in its updated and expanded Third Edition, it’s helped hundreds of happy buyers learn WordPress development the fast, smart, and thorough way.
Here’s what they have to say:
“I think anyone interested in learning WordPress development NEEDS this course. Watching the videos was like a bunch of lights being turned on.” —Jason, WordPress developer
“Other courses I’ve tried nearly always lack clear explanations for why WordPress does things a certain way, or how things work together. Up and Running does all of this, and everything is explained clearly and in easy-to-understand language.” —Caroline, WordPress freelancer
Understanding Taxonomies in the WordPress CMS
A taxonomy is simply a system of organizing information. A WordPress taxonomy, specifically, organizes WordPress posts.
If you’re using WordPress as a blog, you’re already using taxonomies—you just may not know them by that name. A taxonomy is simply a system of organizing information. A WordPress taxonomy, specifically, organizes WordPress posts. All WordPress sites give posts two taxonomies by which they can be organized: Categories and Tags.
These two ways of marking our posts in WordPress have a lot in common. Both can be applied to posts in a “many-to-many” relationship. That means that one tag can be applied to many posts, one category will contain many posts. This is true of both categories and tags. Some people will tell you to limit the number of categories you give a post, often to one. They’ll also give you the advice to use many tags per post. But strictly speaking this is not a technical difference between the two taxonomies, just a cultural difference.
This article was written by David Hayes and originally published on WPShout.