Hosting Tutorial & Guide

How to Create Custom Post Types in WordPress Without Learning PHP

updated on Sep 01, 2017
How to Create Custom Post Types in WordPress Without Learning PHP For good organization of website content, WordPress comes with three post types by default which are posts, pages, and media files. These post types can be further customized and categorized by tags and categories.

The default post types are helpful enough for most basic sites to organize content. But for some content-rich sites, they are not sufficient because they may not be adequate to meet your unique needs. Fortunately, as a flexible CMS, WordPress allows you to create custom post types so that you can add any new type of content that you want, which makes the content organization easier.

For example, if you run an online store with WordPress, you may need a Products post type to add and categorize your products. The same case also goes in the case that you publish testimonials, listings, events, or reviews.

There are two methods available for you to create custom post types in WordPress – by editing code with PHP (which means editing the functions.php file manually), or by using a plugin. The former is good for those familiar with code, while latter, which is introduced in this post, is better for beginners.

Introduce Toolset Types

Toolset Types is a popular plugin that helps you create custom post types without learning or touching any line of code. For the new post types, you are able to customize the WordPress editor for them, and change their tabs' location in the WordPress dashboard.

Also, it allows you to create custom taxonomies and attach them to the new post types. The creation of custom fields is also supported, which requires no coding, either. For developers, there is a fields API which is good to use.

Toolset Types

To use Toolset Types, you have to install and activate the plugin. After the installation, you also have to do the following things to keep your WordPress secure because what you will do later involves the automatic modification of the functions.php file of your theme.

Create Custom Post Types in WordPress with Toolset Types

After the plugin is installed, you will find a Toolset menu item in WordPress dashboard. Opening it and clicking on "Post Types", you will get a list of all the available post types on your site. Now you can start taking the following steps to create the custom post types you want and make them fully functional.

Post Types

Create a custom post type

To create a new post type, you first need to click on the "Add New" button on the Post Types page. On the new page, there are a number of options to deal with, and you should start with the "Name and description" section.

First of all, provide a name for the new post type in plural form, for example, "Testimonials". Then, enter the name in singular form, which will generate a unique slug. Optionally, you can add a description to keep track of the post type easily.

Post Type Name

Below the description, there is an option for you to change the icon of the post type. You can select any of the available icons.

Post Type Icon

If you want to enable categories and tags for the new post type for better organization, you just need to check the following options.

Categories and Tags

Scrolling down, you will get a section to customize the WordPress editor of the custom post type. There are almost a dozen of screen options available, including the title, editor, comments, revisions, author, excerpt, etc. And you can select the ones that you really need.

Post Type Editor

Also, a number of other options are on the page among which you may not be familiar with some of them. However, you don't need to be worried because you don't have to deal with them one by one. Most of the options work great for all content types.

Among these options, you need to pay attention to the show_in_menu option. By default, the custom post types created with Toolset Types are displayed as top-level tabs in WordPress dashboard, and if you want a different way to organize them, you can customize the menu by entering a simple line of code like what we do in the following screenshot. "post" can be replaced by any other post type on your site.

Menu Location

After doing all these things, save the new post type.

Create a custom taxonomy for the custom post type

Categories and tags are two built-in taxonomies that you can attach to custom post types easily. However, what if you want custom taxonomies? Of course, Toolset Types allows you to create them quickly.

Clicking on Toolset > Taxonomies, you are able to create a new taxonomy. Just like post types, you need to give the new taxonomy a name in both plural and singular form, and add a description.

Create New Taxonomy

For the "Taxonomy type", you can choose either hierarchical or flat. The former allows parent/children relationships while the other doesn't. Then, you can select the post types that that new taxonomy is attached to. Simply check the custom post type you want from the available options.

Configure Taxonomy

At last, save the taxonomy. And so far, you have created a custom taxonomy and attached it to a custom post type successfully.

Final Thought

With Toolset Types, everyone, with or without technical skills, can create custom post types and taxonomies easily. In fact, the plugin also comes with many other useful features, for example, creating templates for post types and configuring user fields. Just spend some time exploring more if you want to make full use of it.