How to add a Custom Post Type

Custom Post Types are a great feature in WordPress for having entries that do not fall in the standard Posts and Pages buckets. For Example Portfolios, Projects, events, etc.

A great method for registering a Custom Post Type is using the Post Types Unlimited plugin.

To add a Custom Post Type, install and activate the above plugin. Then go to Post Types > Add/Edit Post Types.

Fill in the name and labels fields.

Extra Settings

I suggest setting Has Archive to true. This will enable the archive (listing) page where all your custom post type entries can be seen. Similar to a blog page.

By default, this archive page will be present at<Name of Post Type>. Ex.:

You may want to enter the plural term here so that the archive page URL will be (for example). You can do that by using the Custom Rewrite Slug setting.

I also suggest enabling Show in Rest API (enables Gutenberg).

Save your new post type and start creating.

Theme Settings for Custom Post Type

You can determine how you want your custom post type to appear on your site by going to appearance > customize > Custom Post Types and working in the post type options.