How to create custom post types with Easy Content Types -

How to create custom post types with Easy Content Types

Enabling custom post types on your WordPress website is, in my opinion, the first step to going beyond WordPress as a blogging platform.

Sure, default WordPress is considered a Content Management System (CMS). You’re managing a collection posts and pages. Further, attached to your posts, you have categories and tags deepening the relationship across your site, forming collections of content. Want to scoop up all of your posts related to business? Apply the business category to it. WordPress, by default, creates an “archive” view of all the posts within the given category.

Custom post types takes managing content on your WordPress website a few steps further. To me, this is where the rubber hits the road for turning WordPress into a true content management system.

Here’s the thing, managing custom post types isn’t something a beginner to WordPress can easily handle. The dashboard doesn’t come equipped to simply turn them on, either. For most of us, using a plugin to create and manage our custom post types is the way to go, and Easy Content Types is just the plugin for you!

Using Easy Content Types plugin

In the video above, I walk you through using the Easy Content Types WordPress plugin to create your very first custom post types. In our example, we cover what you might do to create a collection of books on your website. Useful, again, to show an archive or collection of similar content.

Why use a custom post type (CPT) and not just a page or post?

The million dollar question!

You want to think of your content at scale. For example, if you wanted three pages in your WordPress website to be about the three books you’ve published, that’s pretty simple. In that scenario, sure, using a basic page would do you justice. You’ve only got three published, so it’s quite easy to manage that in your admin.

What becomes more complicated is when you have dozens or hundreds (even thousands!) of books to display. And not just displaying the books, but organizing them and adding information, like custom fields, that goes beyond the content you enter in the WordPress editor.

Want another reason? If you have a team of editors working with your WordPress website, and you need to keep that content away from the marketing pages of your website. Think of someone who does data entry, or manages inventory, there’s no need to give them access to everything.

Then there’s search optimization, and getting into more complex relationships of content, that only a developer could build out for you.

When to use custom post types

when-to-use-custom-post-types

  • When you have a lot of content and you don’t want it to get mixed into pages or posts.
  • When you have many user accounts that need access to specific pages or content to edit.
  • When your site needs better sitemap organizational structure for more than just the blog.
  • When you need to input and display content with custom fields associated (e.g. price, SKU, ISBN, etc).

It’s fair to say there are a few other reasons you might need to use a custom post type, but when it comes to managing content, these are the primary use cases.

Building a collection of books with Easy Content Types

We’ll start off our small bookstore collection using Easy Content Types. As I’ve mentioned earlier, it is one of the easiest ways to create a custom post type, and more importantly, custom fields for your WordPress website content.

You can get Easy Content Types, here.

Once you have the plugin installed and activated, we can begin to build the Books custom post type. Follow along in the screenshots below.

cpt-banner

  1. Let’s name our custom post type, Books. We’ll also need to add a label for singular and plural. That’s useful for when the menu reads “add new book” or “view books.”
  2. Before we add the new CPT, let’s review some of the advanced options. For starters, this is a great place to add a unique icon to represent a book. You can also adjust the order in where the menu item shows up in the admin. There’s a lot here, so be sure to spend some time reviewing everything, but for the most part, you can skip to adding your CPT.
  3. Step three — add your new custom post type!
  4. We’ll need to create a metabox, which contains our custom fields. Think of it like a spice rack in your kitchen. It holds all the individual spices, salts, peppers, and so on. Once we create the metabox, we’ll add the fields — our spices — to the section.

In this example, we’re only making three fields, but as you can see, we could add even more depending if our content calls for it. That’s all there is to it for creating this custom post type.

Using your new custom post type

Now that we have our new custom post type ready, let’s take a look at what makes it different than a normal page and post!

the-books-cpt-view

The screenshot highlights the key areas where your CPT differs from a normal page and post. You can see the metabox that holds the custom fields we created. Users can now select from, or input, new data associated with the CPT. In this case, it’s the three fields we created for our books. Hopefully, you can begin to see the power of custom fields, even in this small example.

Secondly, in the editor, you’ll notice the shortcode pieces displaying the actual value that was inputted below. This creates a more structured and uniform approach to displaying more complex pieces of content across your WordPress website.

You can extend the categorization of your CPT’s by adding taxonomies to them, for better organization throughout your sitemap. The best part of using a plugin like Easy Content Types is that you can continue to build more fields and meta boxes for even more types of content.

If you’re working on your next WordPress website and you need to extend it beyond pages and posts, this is the plugin for you.

Leave a Comment

Your email address will not be published.