When reading about WordPress, you’ve probably come across terms like custom post types and custom taxonomies. As a beginner, you may have asked yourself when do I need to use a custom post type or custom taxonomy in WordPress? In this article, we will explain why and when do you need a custom post type or taxonomy in WordPress.
What are Post Types and Taxonomies?
Post Types is a term used to refer to different types of content in a WordPress site. In all practical sense, it should be called content type.
WordPress comes with five default post types. Posts are one of the post type just like pages, attachments, navigation menus, and revisions. All of them are stored in the posts database table and are differentiated by a column called post_type.
Post types are the way to distinguish different content types in WordPress. For example Post and Pages are both post types, but they are made to serve a different purpose (see the difference between posts and pages in WordPress).
Taxonomy in WordPress is one of those things that everyone use, but they do not know that they are using it. WordPress taxonomies are used as a way to group posts and custom post types together.
WordPress comes with two default Taxonomies, categories and tags. However in some cases, you may want to expand beyond categories and tags. WordPress allows you to create your own custom taxonomies and use them in your post types to group and sort your content.
If you don’t like the video or need more instructions, then continue reading.
How Do You Know When You Need A Custom Post Type or Taxonomy?
You can theoretically add any type of content in WordPress posts and sort them with categories and tags, but sometimes this is not ideal. Below are some signs which will indicate that you should probably consider creating a custom post type, custom taxonomy, or may be both:
- Some content you are posting just doesn’t look and feel like a post. For example our blogging coupons.
- It does not need to be part of a chronological series of entries. For example our WordPress glossary.
- Categories and Tags don’t help you group and sort that particular content. For example: specific sections in our coupons area.
- You need additional fields to enter more information with your content.
- It cannot be part of your pages. For example, our Blueprint page is simply a page with several subpages.
- You need to display that particular content differently than posts or pages.
Lets take a look at a real life example. Suppose that you run a blog where you regularly publish movie reviews among other things. However your movie reviews are very well received by your audience.
Perhaps you want to add extra features to your movie reviews such as add ratings, make it searchable by actor names, genre etc. This is when you will need to create a custom post type for movie reviews, and you will add custom taxonomy for sorting between genres and actors.
This will make it easy for users to browse through only movie reviews whereas going through all of your posts.
Another popular example would be creating a portfolio. If you’re an artist sharing your work in your blog post, then it can easily get lost. Creating a separate portfolio post type will allow your users to easily browse through all of your work.
Some Popular Plugins That Use Custom Post Types
Many popular WordPress plugins use custom post types. One of the most intuitive example of custom post type usage is Soliloquy which is the best WordPress slider plugin. When you install Soliloquy, it creates a custom post type for sliders.
Another popular plugin that uses custom post types is ThirstyAffiliates, which creates a custom post type called thirstylink to store your affiliate links.
WordPress eCommerce plugins, directory plugins, real estate listing plugins, recipe plugins, and others also use custom post types and taxonomies for sorting content.
How WPBeginner use Custom Post Types and Taxonomies
At WPBeginner we use custom post types for our Glossary section. We use Index as a custom taxonomy, and we have a related posts meta box which allows us to link to related posts for each Glossary term. We also use a custom post type for our deals section.
We hope that after reading this article, you have a clear understanding on when do you need a custom post type or taxonomy for your WordPress site.
Additional Useful Resources:
- How to Create Custom Post Types
- How to Create Custom Taxonomy
- How to Create a Custom Post Types Archive Page in WordPress
- How to Add Taxonomy Images in WordPress
- How to Arrange WordPress Posts and Custom Post Types Using Drag & Drop