WordPress Custom Post Types
In WordPress, your content is separated into different types. The standard content types every WordPress is familiar with are Pages and Posts. If you’ve ever been in a situation where you want to add content to your website but it doesn’t really fit into the pages or posts scheme, it may be suited for a custom post type. Typically, if you want to display different subjects of content that will have their own organization structure, custom post types are the way to go. In a nutshell, a custom post type is a specific, separate type of content.
Examples of WordPress Custom Post Types
Some other real examples of custom post types you’ve probably seen are things like products (i.e. WooCommerce), forms (i.e. Gravity Forms), testimonials, etc. Notice that these types of content are specialized and don’t fall within the page/post type. They’re typically displayed using different layouts as well. Other examples of custom post types are things like books, movies, recipes, etc.
When to Use Posts Instead of Custom Post Types
Now that you know what a custom post type is and what it’s for, you might be wondering when to use a post/page vs when to use a custom post type. I’ve already sort of touched on this but here’s a list outlining WHEN to use pages, posts, and custom post types:
Pages are mean to be static. This means they’re intended to display static content such as “About”, “Contact”, and “Services” pages. These are pages you won’t have comments enabled for and, for the most part, you’ll write them and leave them. Pages do not contain an archive and their publish date (and other meta information) isn’t usually displayed. They are also not organized in the same manner as posts; you can also create hierarchical parent/child pages for deeper permalinks (i.e. http://yourdomain.com/page1/subpage1). Pages also do not show up in your site’s RSS feed. Finally, pages can be assigned Page Templates to customize the layout.
Posts are dynamic content that usually feature comments which makes them better suited for social sharing and interaction. Date and age are important for posts because the post meta includes when a post was published. This tells readers how old certain content is and can help the reader to decide its relevancy. Posts are categorized (categories and tags) but are not hierarchical. They also show up in a website’s RSS. Finally, posts cannot be assigned templates to control the layout like pages can.
Custom Post Types
Custom Post Types are wonderful because they can be customized and treated like either posts or pages (or both). You can create an archive, assign specific templates, enable comments for social engagement, categorize them with custom taxonomies (i.e. Movies → Genre, Director, Studio, Year, etc.), display custom fields (custom data), or any other thing you want to do. This flexibility is what helped WordPress really take of as a powerhouse in the content management system market.
Finishing Up On WordPress Custom Post Types
This post is to serve as a basic introduction to what a custom post type is and what they’re for. For more info on how to create and display custom post types on your WordPress website, stay put. I will extend this post with others that will walk you through creating and showing off your very own custom post types.Other Resources for Custom Post Types
- Post Types – WordPress Codex
- Difference Between Posts and Pages – WP Beginner
- The Ultimate Guide to Custom Post Types – Smashing Magazine
- Custom Post Types UI vs WP-Types – Best Plugin for Creating Custom Post Types
Leave a Reply