Creating Custom Post Types Without Code


WordPress is a blog, so it has regular posts, but did you know there are other post types? This Tutorial introduces you to the built-in post types as well as show you how to easily make custom post types with no code required!

This Tutorial will show you how to create custom post types using a plugin called Custom Post Type UI – while Learn WordPress always strives to present multiple options for products to use, Custom Post Type UI is simply the best in its class at the time of publishing this workshop.

Learning outcomes

  1. Understanding what custom post types are.
  2. Knowing how to create new custom post types.

Comprehension questions

  1. How do custom post types differ from regular posts?
  2. What plugin can I use to create custom post types?

Transcript

0:00
Hey, everybody, welcome to another HeroPress Tip of the Week.

0:04
This week, I would like to talk to you about post types, and specifically introduce you to custom post types.

0:12
WordPress has several built-in post types. And the most obvious, of course, is posts. But a page is also a type of post and attachments, revisions, navigation menus, custom CSS and changesets.

0:27
Those are the built-in ones. And you can see those here in the WordPress admin. There’s posts, media holds attachments, pages, comments, revisions. You would see if you started a post and then left it without saving.

0:44
And then the CSS is here in the customizer, that’s what gets stored in here. And then if you were to make a change…I want site identity. And then right here is a gear, you could save these changes as a draft or schedule or something that’s a changeset.

1:15
So these are built-in post types, and some themes like this one I’m using “Kadence WP”, you can see here at the bottom, offer Customizer Settings for different post types.

1:28
So here’s for pages, and then blog posts. Now, what I really want to draw your attention to is custom post types.

1:39
You can create new ones, and do anything you want with them. And sometimes people ask, “what would you make?” and the list is really endless.

1:49
I’m going to quickly show you how to make one. And well you’ll see what you can do with it.

1:55
There’s a plugin called Custom Post Type UI. Normally, you would make custom post types with code. But with Custom Post Type UI, it makes a beautiful interface here in WordPress.

2:06
So we’re going to activate that real quick.

2:09
And then we’re going to add a post type…and it needs a slug. And we’re gonna make a staff listing. So we’ll just call it “staff”.

2:17
And then the plural label is still “staff”. And that can be it if you want – you can put in a description and you can make up custom menu names.

2:30
But the plugin is smart enough to take what we’ve given up here and make reasonably logical entries for each of these.

2:40
There are also some settings here “has archive”, “exclude from search”…that sort of thing.

2:49
I find that the defaults are perfect for everything I like to do. So you can just put in these top three and hit “Add post type”.

2:59
And now on the left under comments, we have “Staff”.

3:04
You can make this little icon here anything you want. Let’s edit this post type real quick. And we’ll go down to “Settings”.

3:15
And here’s “Menu icon” – it can be a dashicon or an image. If you want an icon, you can simply click right here. And then we will say this post type. And now you can see there’s a person there. And now it works just like regular posts.

3:36
You can have a title you have a description. And you can add a featured image so you could put an image of a staff person, etc.

3:49
Now some more real magic comes from when we can add custom fields but that’s going to be another tip of the week.

3:55
I really wanted to point out you can make custom post types. So common ones are event calendars, e-commerce plugins often use a product post type. Your options are endless. You can make anything you want.

4:14
So when somebody says hey, my plugin uses a custom post type of X, then now you’re going to know what they’re talking about.

4:22
I hope you find it useful.

Workshop Details


Presenters