How To Create Custom Post Type on WordPress
Have you ever wanted to know How To Create Custom Post Type on WordPress.It’s really simple and easy.All you need to do is follow a simple step-by-step tutorial and you will have the full knowledge on How To Create Custom Post Type on WordPress.
Before we start we would like to advice you to check our list of the Best Web Hosts
What is a Custom Post Type ?
Custom post types let you store additional information outside of WordPress’ default “Post” and “Page” system.
For example, you can create a “product” custom post type for an eCommerce store or a “job” custom post type for a job listing website.
How to Create Custom Post Type on WordPress
1. Create a New Post Type
To get started, go to Toolset → Post Types. There, you should see a list of the three default WordPress post types (posts, pages, and media attachments).
To create a custom post type, click the Add New button:
2. Enter Basic Details
At the top, enter the basic name for your post type, along with the:
- Slug – this will appear in the URL. For example, yoursite.com/events/event-name
- Editor – whether to use the Classic editor or the new Block editor
- Icon – the icon to appear in the WordPress dashboard sidebar
3. Choose Associated Taxonomies
Taxonomies help you organize your post types. For example, the default blog “Post” post type comes with two taxonomies – categories and tags.
In the Taxonomies to be used with… section, you can choose which taxonomies should be associated with this post type.
You can choose from the default Categories and Tags. Or, Types can also help you create your own custom taxonomies from the Taxonomies tab:
Keep in mind that if you use the default categories and tags, you’ll be mixing your categories and tags with blog posts. Normally, it’s better to create a custom taxonomy for your custom post type if needed.
4. Choose Sections to Display in Editor
Next, you can use the Sections to display when editing… section to choose what additional options to include with the post type.
For example, do you want to be able to upload a featured image to this post type like you would to a blog post? If so, you’ll want to check the Featured Image box.
Want to enable comments? Then, make sure to check the Comments box.
And so on…
5. Configure Advanced Options
This section is totally optional. But if you want to get into more nitty-gritty settings, you can expand the Options accordion.
Some of the things that you can do here are:
- Change the URL structure
- Choose whether or not this post type should have an archive page (like the page that lists all your blog posts – but for this post type instead)
- Choose whether or not this post type should get its own RSS feed.
Unless you’re feeling overwhelmed, I’d recommend exploring all of the settings because you might find something that meets your needs.
Once you’re finished, click the Save Post Type button and you should see your new post type appear in the WordPress sidebar:
6. Enhance Your Post Type With Custom Fields
Another reason that we like Toolset Types is that it also makes it easy to extend your custom post type with custom fields.
If you’re not familiar with this term, custom fields basically let you store “extra” information about a post type.
For the “Event” post type that we created above, that could be details like the…
- Event location
- Event date
- Entry fee
- Attendance limit
To create custom fields with Toolset Types, go to Toolset → Custom Fields. Then, click Add New Group:
On the next page, make sure to assign your field group to your custom post type:
Then, you can add as many custom fields as needed:
Once you save your field group, those custom fields will appear when you go to create or edit one of your custom post type items.