What is a custom post type?

WordPress comes with two built-in types of content, posts and pages. We’ve discussed the differences between posts and pages before, but did you know WordPress also allows you to create more types of content? Let’s take a look at the WordPress custom post type and how it could help you.

What is a custom post type?

From a development standpoint, WordPress is almost infinitely extendable. It comes with a built-in set of tools but themes and plugins can add to it.

That’s where custom post types come in. A theme or plugin can add additional types of content — like posts and pages — but separate from them. Just like posts and pages serve different purposes, these custom post types do as well.

Why would you need a custom post type?

If you have something you want to keep separate from posts and pages, a custom post type can come in handy. For example, if you run a website that hosts movie reviews, you could create a custom post type called Movies that would be separate from your posts and pages. This way, you can have a blog on your website but also have movie reviews and easily separate them.

You can also add additional fields to custom post types. For example, the above Movies post type would likely have fields not only for a title and description (your review), but also year, genre, and potentially a star rating.

A prominent example is a Products post type. In e-commerce plugins like WooCommerce, an additional post type called Products is created. This allows you to create products in an online store separately from your posts and pages. It also creates fields that are only needed for products, like price, size, weight, SKU number, and so on.

How do you create a custom post type?

Several plugins exist to aid in the creation of custom post types. The most prominent is Custom Post Type UI. It provides fields in the WordPress Dashboard to allow you to create basic custom post types.

For more customization options, you might consider hiring a developer to create a custom plugin to meet your needs. Of course, this is one of the services MPWR Design provides, and we’d be happy to create a plugin that can meet your needs specifically.

Also, many plugins exist to create specific custom post types. Just like WooCommerce creates a Product type, other plugins exist to create other post types. It’s highly possible that a plugin exists to create the specific post type you need. Search WordPress Plugins on wordpress.org or in your WordPress Dashboard to see if there’s already a plugin to create the custom post type you need.

Comments