Create Custom Post Types with Types – Custom Fields and Post Types Management

in Blog

The ability to create custom post types in WordPress is nothing new, but the ease with which this can be accomplished is something that continues to evolve regularly. One free plugin from the WordPress Plugin Directory that I’ve been experimenting with lately is called Types. With Types you’re able to quickly and easily create a new post type, custom taxonomies, and custom fields for your post editing page. This particular plugin is one of the highest rated plugins for this purpose in the plugin directory (currently 4.6 stars out of 5) and so I thought I’d get into how to install, configure, and use it in the post below.

Installing the Types Plugin

So the first thing you need to do is head on over to the WordPress plugin directory and download the Types plugin. Once you’ve downloaded the zipped file, go to your WordPress Admin > Plugins > Add New > Upload and install the plugin.


Upon activation you’ll see a new sidebar menu in your Admin called Types. Click there to get started.


Configuring the Types Plugins

The first page you’ll see is the Types Help page. On this page you’ll find documentation, support, and two “starter buttons”. The first is labeled New Custom Post Types and Taxonomy. Click it.


This is the page where you’re able to add a new custom post type. While there are a LOT of options here, there are only three required fields. As seen in the picture below you will need to fill those fields out and after reviewing the rest of the options click Save Custom Post Type at the bottom of the page. I chose to create a post type that I plan on using for book reviews, so naturally I titled it “Books” and gave it an apt description.


Next it’s time to add a custom taxonomy to help you categorize your new post type. Go to the Custom Types and Taxonomies option in the new Types sidebar menu and click the button at the top of the page titled Add Custom Taxonomy. Again, you will see three required fields and then quite a few options. Fill out the required fields and be sure the rest of the options meet your specific needs before clicking Save Taxonomy at the bottom of the page. In my case, since I’m creating this taxonomy to help me keep track of the types of books I review I’ve chosen to select Book as the post type I want Types to associate this taxonomy with.


So now I have a new custom post type and a specific taxonomy (Genres) with which to track and categorize my book reviews by. What I now need are a series of custom fields to help define what makes my new post type it’s own thing. To do this I go Custom Fields in the Types sidebar menu and click the Add A Custom Fields Group button to get started.


On the Add New Group page there are four sections that need your attention. The first section is where you give your group a name and description. I decided to call mine Book Meta since this group of custom fields will contain the standard information I wish to provide for every book review I write.


Next I’m going to choose when and where this group of custom fields will appear. In this instance I’ve decided I only want this group to appear when I decide to add a new Book.


Now it is time to select the fields I want for my Book posts from the menu of available fields. All I have to do is click the button with the label I desire and the field will appear under the Fields label.


When a field first appears it will be expanded to allow for customization. The first field that came to mind was Title. I’m going to want to show the title of each book and so having a required field for this only seemed logical. As you can see I gave it the name Title, the slug title, and description – book title. I kept the default option that states this field can have only one value and then I marked this field as required; meaning it will not be possible to publish a new Book post type without a title value in this field.


I do likewise with the rest of my field choices and then arrange them in the order I’d like them to appear by dragging and dropping them in place. Once I’ve added and arranged all of the custom fields my new post type requires I hit Save at the bottom and then navigate to my new Books post type to everything out.


When I click on Books, which now appears in my Admin sidebar as a custom post type, I am able to see what will become an archive of Book posts. When I click Add New Book, I am brought to a page similar to the standard Add New Post page but containing the custom fields and taxonomy I just created moments ago.


I now have specific fields in which I am to upload the book’s cover image and enter its title, author, publishing date, description, and affiliate link. All of which are required before WordPress/Types will allow the post to be published. You will also notice that in the side bar where there is normally a section for tags/categories there is instead a place for me to list the book’s genre(s).


And that’s that. Pretty easy!

My Thoughts

From start to finish I was really impressed with Types. True to its word it makes creating custom post types, taxonomies, and fields extremely easy. With minimal effort and time I was able to create everything I needed to publish book reviews in a way that was completely customized for my blog and blogging style. And not just that, but I – and anyone using this plugin – can do the same thing for any other post type just as easily. But this news isn’t as good as it may seem.

The unfortunate catch is that anyone who is not a developer and has no interest or ability when it comes to editing PHP is in for a nasty surprise. The only way to get your new custom post type to display as a post is by creating a new PHP post template specifically for it. Why is this necessary? Because a classic post is “governed” by a file within your theme called Single.php or maybe Post.php or single_post.php. Regardless of the variation the point is that this file tells your content how to format. Without a similar file for your new custom post type, when you click publish it will appear blank.

So what’s the point of reviewing this plugin if it’s going to be useless to anyone who can’t edit PHP? Well two reasons: 1) a lot of our readers CAN edit PHP and I thought this plugin was pretty sweet; and 2) there are ways of getting around this unfortunate catch, though they will either cost you time and/or money.

The first solution is another plugin by the same authors as Type called Views. This plugin is a premium plugin priced at about $50 and it shows you how to use a series of shortcodes to format your new post types. The downside to this is that it’s still quite a bit like coding (if you’re not a developer) and above all it’s design solutions are just plain ugly. If it were me, I wouldn’t go this route.

The second solution will also cost you money. This is the solution where you create the post type(s), taxonomies, and fields you want and then you pay a developer to create your post templates for you. Depending on your budget and the developer you hire, I’d say this is a pretty good option if custom post types are important to you.

The third option will probably cost you both time and money, but only up front. In the long run it’s possible this solution will prove to be the most beneficial but I think that depends on the type of person you are. If you haven’t already guessed this is the solution where you learn php (and probably html and css while you’re at it) and write the templates yourself. Granted, this solution provides ZERO instant gratification, but if WordPress is something you’d like to master and custom post types are important to the types of websites you like to build, then this is your best bet.

All of that said, I still highly recommend this plugin. I just think it’s pretty important you know going into it that you are going to have to be ok with one of the three options I just outlined if you’d like your new post type(s) to see the light of day. But that’s just my opinion. What do you think? Let us know in the comments below!

Download the Types plugin today