How to manage your content better with custom post types
When you are designing a website you need to have control over your content. Without the ability to manage and categorize your data not only will it make it harder to build professional websites but it will also make it harder for users to navigate your site.
The most popular software for building websites is WordPress with 35% of all websites using the content management system. The best way to categorize your website on WordPress is with custom post types which are easy to make on WordPress when you use Toolset.
What are custom post types?
Custom post types are the best way to separate your data into manageable sections on your website.
Let’s look at an example. Imagine you run a cooking website with recipes. On WordPress, you have two default post types to which you can add information: posts and pages. The problem is when you need to add different types of data.
Let’s say you want to add content about restaurants and cooking classes in addition to your recipes. You would have to add all three types of content to the two built-in posts. How confusing will be if someone managing the back-end clicked on “Posts” and saw both recipes and restaurants in the same section?
But with custom post types you can create sections for all of your content.
What are the advantages of using custom post types?
First, it will be easier for your visitors to find the content. Below you can see Toolset’s demo cooking website which you can download for free. It contains custom types. If a user wants to find simple recipes all they would need to do is click on the “Recipes for beginners” and they will be able to see them all.
Second, it will be easier for you to manage your website on the back-end. As you can see below, all of my recipes can be found in the “Recipe” section of the WordPress dashboard. I added this section by creating a custom post type.
The best tools for creating custom post types
Web developers use PHP to create custom post types on WordPress but there is a far easier way. You can create custom post types in seconds using Toolset.
With Toolset, you do not need to use any coding at all. All you need to do is click a few buttons, type some words and you are done!
Below I will show you how easy it is and how you can display your custom post types on the front-end.
How to create a custom post type using Toolset and display them on the front-end
I will use the cooking website to create a custom post type for my video recipes. Once I’ve finished I will be able to easily add recipes to the custom post type and users will find them on the front-end.
1. Create the custom post type
To create a custom post type you simply head to Toolset -> Dashboard and click Add New Post Type.
All you then need to do is fill in the three fields at the top with the name in singular and plural of your new post type and click Save Post Type.
You will now see the custom post type appear in the right-hand sidebar of your dashboard.
If you are stuck you can find out everything you need to know in our guide to creating custom post types.
2. Create the custom fields to add structure
Now that you have your custom post type ready you need to add your custom fields to provide structure to the content.
On Toolset -> Dashboard you can click Add custom fields to start creating them.
It is then simply a case of choosing the type of field you want to and naming it. Below you can see the custom fields I created for my “Video” custom field.
If you are still unsure, find out everything you need to know in our guide about creating custom fields.
3. Add your content to your custom post types
Now that you have the structure in place you can add the content.
Head to your custom post type, click Add New and enter the information for that post. I’ve filled in all of the fields for my “Videos” post type as an example.
You can continue adding your content until all of your posts are ready.
4. Displaying your custom post types on the front-end
Your custom post type is ready on the background but you still can’t see it on the back-end. It’s time to change.
The easiest way to display all of your posts together is by creating an archive.
Head to Toolset -> Dashboard and click to Add archive.
You can now decide what you want each post to display. The way to do this with WordPress and its new Gutenberg editor is by adding blocks. Toolset extends these blocks by allowing you to add dynamic fields.
Each time you add a block, such as the “Heading block”, you can choose to make the source dynamic. Below you can see all of the blocks I’ve added to my Video custom post type. See how the block comes from the post title field and links to the post itself. In addition, you can see that each title is different.
Once you have saved your archive you can then see it on the front-end.
To find out how to create an archive step-by-step take a look at our guide to creating a custom archive page.
5. Add the custom post type to the menu
Now you just need to make it easy for your users to find your custom post types. One way is to add a link to the menu on your homepage.
To add a link head to Appearance -> Menu and enter the link under the Custom Link section along with a label.
Once you’ve ordered the menu options you can see the result on the front-end.
You now have a custom post type which contains all of the categorized information.
Create your custom post type today!
Here are the steps to take so that you can start adding custom post types today.
- Download Toolset
- Check out one of our Toolset courses to learn all about adding custom post types.
- Practice adding custom post types and other features using one of Toolset’s free reference sites.
- When you are ready, install and register Toolset on your own website and get started!