How to Create WordPress Custom Post Types With Plugin
If you plan to create a WordPress blog you’re probably aware that this can be an easy and challenging task at the same time. In an ideal scenario, bloggers want to spend more time on content creating and less time on its adding to the website. Luckily, WordPress as the leading CMS integrates an easy-to-use post format that works perfectly for most of the bloggers. But what if it doesn’t work for you? Let’s assume you run a food blog with a main focus on food origins, growing conditions, etc. Default post format will be just enough here. But, in case you want to offer more versatile content such as food recipes, this post format won’t be enough. For this purpose, you would need a custom-made post format that is particularly made for food recipes. The good news is that WordPress gives you the freedom to add as many custom post types as you need. Custom Post Type UI plugin allows you to do this with zero effort.
In this custom post type UI tutorial, you will learn how to:
To install the Custom Post Type UI plugin, you can simply head to the admin area of the theme you have acquired and click on Plugins > Add New. Type Custom Post Type UI in the search bar on the right and select the Custom Post Type UI plugin. To install WordPress plugin, you should simply click the Install Now button. Once it is successfully installed, the success message with the activation link will appear on your screen. In order to fully activate the plugin, you should click on the activation link, et voilà, the Custom Post Type UI plugin is now installed on your WordPress website.
To create a new WordPress custom post type, head to CPT UI > Add/Edit Post type.
Although you can play with different setting options, first you need to pay special attention to Basic Settings. Here, you can see fields where you can predefine slug and labels which is a starting point for creating custom post type.
But what exactly are slugs and labels? In a nutshell, these are the names you give to your custom post type. Slug is used for various queries for post type content. Make sure your slugs only contain alphanumeric, latin characters. On top of this, underscores should be used in place of spaces.
When it comes to labels, these are your personalized custom post names. After you create the first custom post, it will appear in your admin dashboard. From there you can create new post types in a few simple steps.
To illustrate this, let’s take a default WordPress post as an example. As you see here, the label is named as Post/Posts.
After you insert your desired labels and slug, save the changes to proceed further. As you remember, we are creating recipe custom post.
When the post is added it will appear on your admin dashboard.
You can notice that All Recipes field with Add New option is included to our admin dashboard. However, tags and categories can be added later in case of need. If this is the case, we can use the Taxonomies option and add categories and tags to our article.
Also, pay attention to the icon that’s placed under the custom post as it’s the same as the one used for a default post. In the next chapter we will explain how you can change your post icon and adjust the order of your custom post items on the admin dashboard.
When you create the first custom post, it will get a certain position by default. If you want to change it or place it closer to the default post, go to CPT UI > Add/Edit Post and find the Edit Post Types field.
Here you can see a lot of options, but what you now need is a Menu Position field.
Define the position in the menu order in range from 5 to 100. Depending on your dashboard and its items, you may have to try different options so you can find the one that fits your requirements the best. For instance, option 5 works perfectly in our example since it places a custom post under the default post.
Now, let’s see how you can change the icon of your custom post. This option is placed on the same place as the option for changing its position. Click on CPT UI > Add/Edit Post, find the field Edit Post Types. Here, look for the Menu Icon field with its options.
Your icon size should be 20px by 20px. After you add your icon to the Media Library, you can insert its URL link in the Menu Icon field. The final result of your custom post looks like this.
After you create your first custom post, you can further adjust it. As you already know, we created custom recipes post type. When we go to the All Recipe, we can see there are no new recipes since we haven’t added any. Also, we see that this page looks the same as a default All Posts page.
To create a new post go to Add New. This post looks the same as the default post. Also, we can create the new post with the page builder we use. After we create the first custom post, we will enrich it by adding custom fields following our needs. Specifically, we are adding fields for our recipes. In other words, next time we want to add recipes, this post type will be ready so we can fill in the new information with complete ease.
Now, let’s take a closer look at the Document tub on this custom post.
As you can notice, this tub has less options than default post format.
As many of these options are frequently used, we want to show you the best way to use them.
Go to CPT UI > Add/Edit Post click on a tab Edit Post Types. Find the Support option and check all the fields you want to include. It’s a piece of cake!
In short, taxonomies are the method of classifying content and data in WordPress websites. Taxonomy allows you to group similar things together. Thus, taxonomy refers to the sum of those groups. In WordPress CMS, taxonomies are categories and tags you can add to uplift your content.
Let’s once again take a look at our custom post type we created with a custom post type plugin. What is visible at first sight is that this custom post doesn’t have categories and tags that are an integral part of default posts. Of course, if you don’t want to group your custom posts, there is no need for adding categories and tags. However, if you want to do this, keep reading.
There are two ways for adding taxonomy with custom post type UI.
The first option allows you to use the existing categories and tags from your default post in your custom post as well. To give your custom post an access to default categories, go to CPT UI > Add/Edit Post, click on Edit Post Types. Find the option Taxonomies.
In our example, we are giving default post categories to our custom post. Other options that are offered are dedicated to shop taxonomies. If you don’t have WooCommerce plugin installed, these options won’t be visible. After we save all the changes, categories and tags will become visible in a custom post.
Have in mind that you have to be careful when using this method of taxonomy creating. Every change you make for your custom post categories will apply to your default post categories as well (and vice versa). So, before you make changes, make sure it works for both your custom and default post.
Apart from this, there is another way for adding taxonomy to your default post. Just create complete new categories and tags that are independent from those on a default post. To do this, go to Add/Edit Taxonomies and create taxonomy in the same manner as you created a new custom post.
There is one more thing you should change before you save the changes. Pay attention to Hierarchical opcion that defines what sort of taxonomy you want to create.
Here, you can choose between True and False hierarchical values. If you want your taxonomy to be a category with parent-child relationship, choose True. When you want to create a tag, choose False.
Finally, when the taxonomy is created, a new field will appear on a dashboard. After this, you can create categories for default and custom posts independently.
Let’s Wrap It Up
Custom posts can truly transform your blog and website in general. With CPT UI plugin, anyone can use versatile options to do this with ease. Choose the method from our custom post type ui tutorial that meets your needs and start another chapter of your WordPres journey.
We hope this article was helpful. If you liked it, feel free to check out some of these articles as well!