Out of the box, WordPress is a powerful content management system. You can create any type of website, for whatever you need, whether it be for a brick or mortar business, affiliate marketing, blogging, ecommerce, portfolio, and more. Because of its versatility, WordPress has become the number one CMS in the world, with more than 43% of websites online powered by it. Part of the success is because of custom post types. In this article, you’ll learn about custom post types in WordPress.
What is a Custom Post Type?
In version 3.0 "Thelonious" of WordPress, custom post types were introduced.
A custom post type is a tool intended to extend the functionality of WordPress beyond just the default post and pages. However, there are more than just pages and posts that fall under custom post types.
The following are post types:
Posts
Pages
Navigational Menus
Attachments
Revisions
Posts
Posts are non-hierarchical, displayed in order of latest published post being first. Most people use posts for their blog or news section of their website.
Pages
Pages are different from posts in a way that you can add a hierarchy to them, or even display only one page. This post type is usually good for static content that may be important areas of your site, like your services pages, or contact page.
Navigational Menus
Navigation menus are separate in a way that you can organize and display posts or pages, or other custom post types in any manner you desire.
Attachments
The attachment post type is normally associated with what you upload to your media library, whether it be an image, audio file, PDF, or even video.
Revisions
The revision post type allows WordPress to store previous versions of any post type, in the case you need to restore it. You can also compare current and previous revisions to each other.
Anything outside of these default WordPress post types would be considered custom post types. They can be classified as any of the default post types, but must be named differently, in order to keep them separated. For example, if you wanted to build a portfolio, then you might want it to act similar to a page, but you will want to name your custom post type as “portfolio”.
Why would you need a custom post type?
Custom post types can be used to turn your website from a simple one that allows blogging, to:
Event Calendars
Real Estate Listings
Directories
Portfolios
Forums
Testimonials
Quotes
News outlet
… and much more!
In fact, there are many plugins in the WordPress plugin directory that add custom post types to achieve some of these types of sites, like:
These types of plugins are designed to remove some of the legwork of creating a custom post type, but also providing design and other functionalities.
How to create a custom post type in WordPress using a plugin?
While you could create custom post types by adding some code to your WordPress theme’s functions.php file, there’s an easier way to do that - with a plugin. Why use a plugin? Well, a plugin will allow you to organize your custom post types and keep it separate from your theme. If you end up changing your theme at a later time, then you have to remember to copy and paste the custom post types code to your new theme’s function.php file.
Install Custom Post Types UI
Name your custom post type
Add attributes to your custom post type
Adjust your custom post type’s settings
Add taxonomies to your custom post type (optional)



























