DEV Community

Cover image for WordPress Concepts: Taxonomies and Categorizing Posts
Amirition
Amirition

Posted on

WordPress Concepts: Taxonomies and Categorizing Posts

In the previous posts, I wrote about custom post types and action/filters in WordPress. Another great concept that can help you in understanding and developing WordPress themes and plugins is taxonomies.
So basically a taxonomy is something that you classify, categorize or group WordPress post types with. How about an example?
Suppose that you have a website with a custom post type, Movie!
anything about a movie that you can categorize your movies with can be a taxonomy. For example genre, country, award, rate and etc.
Alt Text

As you can see in the above picture, the IMDB uses taxonomies too. For genre taxonomy, horror is a "term" in WordPress. So every taxonomy has some terms in it. Horror, drama, comedy, sci-fi, and western are some terms for genre taxonomy.

WordPress has two default taxonomies which we're all familiar with:

  • Tags Which are non-hierarchical built-in taxonomies.
  • Categories Which are hierarchical built-in taxonomies.

You can create your own taxonomy and create an archive page for them. Find out how to create a taxonomy for CPT in WordPress developer reference.

How did you use taxonomies in your project? Are tags and categories enough for any project? Tell me in the comments.

AWS Q Developer image

Your AI Code Assistant

Generate and update README files, create data-flow diagrams, and keep your project fully documented. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

AWS Q Developer image

Your AI Code Assistant

Ask anything about your entire project, code and get answers and even architecture diagrams. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Start free in your IDE

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay