What are WordPress custom post types?
The WordPress content management system (CMS) relies heavily on post types. These are types of content which are managed in the WordPress admin area, and can be displayed on the front end of your website.
What is a custom post type?
WordPress itself comes with several built-in post types, such as pages and posts. It can be extended by adding additional content types. These are called WordPress custom post types (CPT).
You can use the free Easy Post Types and Fields plugin to easily add custom post types to WordPress.
How are custom post types added?
Custom post types might be added to your website in several different ways:
- WordPress themes - Your theme might add custom post types for the different types of content which are used to store information. For example, themes commonly add custom post types such as Testimonials, Team Members, and Portfolio.
- WordPress plugins - Lots of plugins create custom post types in order to store information. For example, an events plugin will normally create an events custom post type. A document library plugin will create a documents post type. And an e-commerce plugin such as WooCommerce will create a products post type.
- Your own custom post types - You can also create your own custom post types to store information that you need to store away from your pages and posts. Developers can do this programmatically, or you can create your own custom post types in WordPress using a free plugin like Easy Post Types and Fields.
What are the benefits of WordPress custom post types?
The main benefit of a custom post type is that you can manage it separately from the other types of content on your website.
For example, let's say that you are adding a portfolio section to your site, where you will be adding case studies of your successful projects. One options is to add each case study as a page or post. However, that will clutter up your list of pages and posts, and isn't really an appropriate use of pages or posts. It mixes up your case studies with your other content.
You can reduce the problem by creating a 'Portfolio' category, but that still doesn't fully separate the different content types. For example, the portfolio posts will appear on your main blog page and in your site's RSS feed, which you may not want.
A far better solution is to create a 'Portfolio' custom post type. This adds a dedicated 'Portfolio' section to the WordPress CMS. You can add portfolio posts and structure them away from your other content types. This makes your website much more logical and easier to manage.
Having a custom post type also makes it easier for developers to create custom styles and templates for different content types. For example, you might ask your developer to design a purpose-built template for your portfolio posts, instead of having them match your blog posts.
Where can I view custom post types in the WordPress Dashboard?
Custom post types are really easy to manage in the WordPress CMS. Each post type has its own top level link in the left hand side of the WordPress admin. For example, if you have a 'Resources' custom post type then a 'Resources' link will appear in the admin.