If you are looking to create custom post types in WordPress but aren’t sure about the process to do it, this blog post is for you. In this post, you’ll have a clear understanding of custom post types, why they’re important, and what differentiates them from the default WordPress posts.
We’ll also find different approaches to use custom post types, the exact steps required to create them, and the problems experienced using custom post types.
Importance of Creating Custom Post Types in WordPress
- One of the biggest reasons behind WordPress popularity among business enterprises and website developers is its flexibility.
- It is easy to change the website’s design using the WordPress themes, add new functions and features using plugins, or use widgets for the site’s specific pages.
- Custom post types is another WordPress feature providing flexibility and support to turn your site from a simple blogging platform to a complete CMS.
- Using custom post types, WordPress Website Development Company can structure the website’s content precisely the way required rather than implementing the default WordPress structure.
- Ecommerce websites can make use of custom post types to build product pages, and agencies can use them for case studies.
Introduction to Custom Post Types
Custom post types are basically content types including posts and pages. Since WordPress evolved from a basic blogging platform within the robust CMS, the term post added to it. But a post type can be any kind of content.
By default, WordPress offer these post types:
It is easy to create your own custom post types and name them whatever you want.
For example, if you own a movie review website, then you would create a movie reviews post type. This post type consist of different custom fields and even their own custom category structure. Other examples include Portfolio, Testimonials, Products, etc.
Difference between Custom Posts & Default WordPress Post
Every post in WordPress has a different set of attributes and features. For instance, the post type in WordPress is used for the blog content and is different from the Page post type.
When you publish a post, it seems on the site’s blog, pages don’t. You can assign tags and categories to the blog posts, not pages. In addition, you can assign a parent page for every new page. There’s no such option for posts.
WordPress creates individual attachment pages for every file uploaded.
But those pages don’t seem within your blog or on any other page. They also don’t have the choice of a featured image. If you want those options, just hire WordPress developer to create a custom post with those options required in it.
When you build a custom post type, decide its attributes and the additional features required by the users to have when publishing content. Once developed successfully, custom post types appear in the WordPress dashboard as a content type with its own menu.
Steps to Create Custom Post Types in WordPress
Here’s the step-by-step process you need to follow.
Step 1 – Install and Activate Custom Post Types UI Plugin
The first step to create custom post types for the WordPress site is to download, install, and activate the Custom Post Types UI plugin.
Here’s how to do it.
- Login to the WordPress website dashboard
- Click Add New under Plugins in the WP dashboard.
- Search for the Custom Post Types UI plugin in the search box on the plugins page.
- Click Install Now to download the plugin to the website.
- Click Activate to start running the plugin.
- If plugin is successfully installed and activated, it will redirect to the welcome page.
- You can check the plugin in the WordPress dashboard’s left menu, titled CPT UI.
Step 2 – Create Custom Post Types
Once you’ve installed the relevant plugin, next step is to configure it properly and create first custom post type.
- Click on Add/Edit Post Types under CPT UI in the WordPress dashboard’s left menu.
- The Add/Edit Post Type section is where you will create your new custom post type.
- In the Post Type Slug field, provide your custom post type an alphanumeric slug (URL). You can simply use Latin characters, underscores, and dashes in the slug. For example, the slug for Page post type is “page.” Thus if your new custom post type is Products, use the same word in the slug for streamlined identification.
- Next, provide your custom post type a Plural label that will be showcased in the dashboard and everywhere else on the website. In the Singular label field, provide the singular form of the label.
- Click link below the Singular Label field to simply populate the fields in the Additional labels section provided on the selected labels.
- Now, add a short description of the custom post in the Additional labels section. This is for the reference and won’t be visible to the website visitors.
- Next scroll down to the Settings section.
- In this section, just configure the custom post type’s properties and see it appearance in the WordPress admin dashboard and on the website.
- Further down the list, you have the feature to support archives for the custom post type. Setting this to True will build a dedicated listing page for the custom post type.
- You can also support parent-child posts for the post type using the Hierarchical setting.
- At the bottom of the Settings section, open Supports label.
- This is where you can manage different WordPress editor features for the custom post type.
- And at last, you have the feature to choose any existing taxonomies for custom post type.
- Click Add Post Type once you complete the settings.
So, these are the steps involved to create Custom Post Types in WordPress CMS.
Using custom post types is a successful means to publish different types of content on the WordPress site. But to properly utilize custom post types, it is important to understand how to use custom fields within the WordPress. Combining custom post types and custom fields will support in creating more comprehensive content with additional information about the topic.