Skip Navigation

Creating a Custom Post Type

Custom post types let you add your own data types to WordPress sites. When you build sites with custom post types, you make both the content administration and the front-end design easier.

Duration

Out-of-the-box, WordPress comes with pages and posts. If you want to display other types, such as products, testimonials, projects and anything else, the best way is to setup custom post types.

With custom post types, different types of content are organized under different menus. You can also control user access for different types, allowing better management of your site.

Steps for Creating Custom Post Types

  1. Go to the Toolset → Dashboard page and click the Add new post type button.
  2. Enter the plural and singular name for your post type. Slug is created automatically.
  3. Click the Save Post Type button.

The page will reload and you will see your post type appear in the main WordPress admin menu.

Select fields to display on the post type’s listing page

In the admin, the listing page for your custom post type displays all the posts belonging to that post type. By default, the list only has columns for the post title and date of publication.

Once you have created your own custom fields, you can show them as columns on the custom post type listing page.

To do this:

  1. Edit the custom post type.
  2. Expand the Post Fields to be shown as columns in Post Type listing in WordPress Admin section.
  3. Select the fields you want.

Sections to display when editing posts

When you edit a custom post, by default, you will see only two standard post fields you can edit: title and the main content (the main editor). 

To enable additional post fields when editing:

  1. Edit the custom post type.
  2. Expand the Sections to display when editing… options. 
  3. Use checkboxes to enable options like the Author, Comments, and more.

Originally written
May 11, 2020
Updated
July 31, 2020