A custom post type is extra functionality that allows WordPress users to create a wide array of content other than the default posts and pages. However, not everyone has a rich knowledge of this functionality, so recently many users have asked “how to create custom post types in WordPress?”. In today’s blog, we will give you an insight into what it means. In addition, we will show you the easiest way to create these post types in WordPress. Now, let’s explore.
What is a Custom Post Type in WordPress?
Custom Post Type is a content type. It is similar to Posts or Pages on your WordPress site. You can also edit and add anything to your preference. However, the biggest difference between regular posts and custom post types is that custom post types display a different value for post_type inside the database. It means that it is different from the default values such as page, attachment, and post.
By default, WordPress offers various post types including:
- Post
- Page
- Attachment
- Revision
- Nav Menu
How to create a custom post type in WordPress?
There are several ways to create custom post types in WordPress. However, in today’s blog, we are going to share an easy method using a free plugin.
The amazing plugin that we would like to introduce is the Custom Post Type UI plugin. This is one of the great WordPress custom post type plugins that can help you create custom post types as well as manage taxonomies on your website.
To use this method, simply follow the steps below.
Step 1: Install and activate the plugin
The process of installing this plugin is the same as for other plugins in WordPress. For more support, see our step-by-step guide on how to install a WordPress plugin for beginners.
Step 2: Create custom post types
After activating the plugin, let’s navigate to your WordPress dashboard and click on the new item in your WordPress menu titled CPT UI.
Simply go to CPT UI > Add/Edit Post Types page to create a new custom post type.

Under the Basic Settings section, you need to enter a slug for your custom post type. The slug will be displayed in the URL, so it can only include letters and numbers. When you provide the slug, it will automatically be converted to lowercase letters.
Secondly, you need to give your custom post type a Plural label that will be displayed in your dashboard and anywhere on your website. And in the Singular label field, you need to enter the singular form of your label.
Next, when you click on the option displaying “Populate additional labels based on chosen labels“, the plugin will immediately fill in the rest of the label fields in the following section.
Under the “Additional Labels” section, you can give a description for your post type as well as change labels by yourself.

Now, let’s keep scrolling down the screen to the Settings section. From here, you can configure your custom post type’s properties. In addition, each option will display a brief description explaining how it appears in your WordPress admin dashboard and on your website.

For example, you have the option to show your custom post type in the navigation menus as in the screenshot above.
Further down the list, there is an option that allows you to enable archives for your custom post type. Let’s set this option to “True” if you want to create a dedicated listing page for your custom post type such as a category page.
You can also enable parent-child posts for your post type by setting the Hierarchical option to “True“.

At the bottom of the Settings section, you will see a lot of options to select which editing features your post type will support. Tick the options that you want to be included.

And finally, you have the option to choose any existing taxonomies for your custom post type.

Once you have completed all the options, click on the “Add Post Type” option.
Now, your new custom post type is visible in your WP dashboard.

How to display custom post types in WordPress?
Method 1: Display custom post types on the front page
The biggest advantage of using custom post types is that they help you separate your custom content types from your regular posts. Nevertheless, if you still want to show them among your regular posts, you can do that by adding the following code to your theme’s functions.php file or a site-specific plugin.
add_action( 'pre_get_posts', 'add_my_post_types_to_query' );
function add_my_post_types_to_query( $query ) {
if ( is_home() && $query->is_main_query() )
$query->set( 'post_type', array( 'post', 'movies' ) );
return $query;
}
Don’t forget to replace “movies” in our example code with your custom post type.
Method 2: Display custom post types in widgets
Usually, the default widget in WordPress only allows you to display recent posts, but it doesn’t permit you to display a custom post type.
Don’t worry, there is a simple way to help you handle this task.
First of all, you need to install and activate the Ultimate Posts Widget plugin. After installing the plugin, let’s visit Appearance > Widgets and simply drag and drop the Ultimate Posts widget to a sidebar.

This useful widget enables you to easily display recent posts from any post type. You can customize the settings of the widget by choosing the options according to your preference.
Once you are done, don’t forget to click on the “Save” button. Then visit your website and see your custom post types displayed in the sidebar.
Method 3: Display custom post types using default archive template
This method allows you to display your custom post types in your navigation menu.
First, you need to go to Appearance > Menus and then add a custom link to your menu. This custom link will link to your custom post type.
If your website is using SEO-friendly permalinks, then your URLs will look similar to the following link:
http://ltheme.com/movies
In contrast, if the permalinks of your website are not SEO friendly, then your URLs will look like this:
http://ltheme.com/?post_type=movies
You can go ahead and paste the URL that matches your website type. And don’t forget to replace the ltheme.com with your domain name and the “movies” with your custom post type name.
Finally, don’t forget to click on the “Save Menu” button before visiting the front end of your website. Now, a new menu item has been added to your navigation menu for your custom post type archive page.
Conclusion
We have just walked you through a detailed guide on how to create custom post types in WordPress. Hopefully, the information above has answered all your questions. If you encounter any issues or need our assistance, please let us know in the comments below.
By the way, you can visit our Free WordPress Themes where we provide plenty of nice, SEO-friendly, responsive designs for your successful website.




