Want to create a product card or tour description? Do you need more options for the proper design than what is available in WordPress?
The functionality of WordPress is impressive. You can create almost any website you want with its help. But sometimes, the features are not enough. We need additional features that will simplify the work or help make some separate unique elements. In this case, custom content type and custom post type help out. This material will analyze what is suitable for your site and how to choose the best option.
Custom Content Type Module – the Origins
Let’s start from the beginning, I mean, the Custom Post Type! I bet everyone out there knows what it is. Just in case, here’s a quick explanation:
Custom Post Type (CPT) is any post type that differs from simple posts. For example, there are the default post types like pages or media, but if you need to create something different, e.g., a car or property post, you need to expand the default functionality by creating the Custom Post Type.
JetEngine enables creating CPTs for organizing your site’s content within a simple and intuitive interface. Learn more about how to create a custom post type.
CPT is a very well-known and convenient solution, but it has its peculiarity. All the data it includes is stored in two database tables – post and post meta. Moreover, every meta field of every post is stored as a separate row, which means that if, for example, we have a custom post type with 20 meta fields, it will occupy 1 row of the post database table and 20 rows of the post meta database table. Thus, if we add 100 posts, their data will occupy 2100 rows of the database.
The bad thing about large databases is that it takes a long time for the system to process all the records to find the required data. Ultimately, the more data you have on your site, the slower its loading speed. We wanted to solve the issue. And that’s how Custom Content Type appeared.
What is a Custom Content Type (CCT)?
Custom Content Type (CCT) is any post type that differs from simple posts and allows you to create a separate table in the WordPress database to store its data. You can configure its structure and add an interface to the admin panel to view, edit, and export data stored in this table.
In other words, CCT is quite similar to CPT, but all the data of each custom content type is stored separately from the rest database. Besides, every item of any CCT is just one row of the table, which means that 100 posts occupy 100 rows of the database, unlike 2100 within CPT. Also, these 100 rows will be stored in a separate table, so when we select regular posts from the database, the data from our CCT will not affect them in any way, ultimately not affecting the website loading speed.
Let’s take an example. Imagine that you are selling a car. You need to create a description and write:
- the mileage of the car;
- year of issue;
- interior material;
- engine volume, etc.
It will be inconvenient for you to work with the posts that WordPress offers. So it’s better to use a custom content type for this, especially if you need to make a lot of such descriptions.
It is crucial that the site loads quickly, everything is displayed correctly, and you can easily create a large number of descriptions in a single format. The custom content type will help with this task.
Custom Content Type vs. Custom Post Type
Although Custom Content Type might become a real turning point in the world of WordPress, the current version is the first one and is not flawless yet. While the Crocoblock team is working hard on CCT’s further development, there’re still some cases when you better choose Custom Post Types, for example, if you are going to use the default archive system by taxonomies or plugins that are not compatible with CCT yet.
To make it easy for you to decide whether to use CPT or CCT in some particular cases, we have prepared this graphic:
How to Сreate a Custom Content Type?
Plugins are solutions that simplify the work of all developers working on WordPress. In addition, they help add an endless amount of features to your site.
Let’s take JetEngine as an example. To create a custom content type with it, you need to:
- Install JetEngine on the site.
- Choose from a list of custom content type fields and capabilities.
- Choose the design and layout of the custom content type.
With the JetEngine plugin, you can:
- Create catalogs with a convenient search by specified parameters.
- Create lead generation forms and accept applications from potential customers.
- Create suitable databases and manage them.
- Create a crowdfunding platform and receive payments for your project.
- Create documents, pop-ups, lists, and grids.
- Give different levels of access to users to manage content.
Let’s explore these possibilities in more detail.
How to Use Custom Content Type?
Now let’s look at the striking examples of when you should definitely use the Custom Post Type. Please, pay attention to the anchor links within the description – they lead to video fragments of a detailed explanation from the latest Custom Content Type presentation by our CTO Andrew Shevchenko.
Custom Content Type for data storage
The simplest example is a subscription form on a website. If using Custom Post Type form, then each new subscription is stored as a separate post on the backend. If there are lots of subscriptions, after a while, they will significantly influence all widgets, single pages, and even the menu. And here Custom Content Type will help us out! If creating the subscription form as the CCT, all data will be collected in a separate table, which does not affect the site in any way. You can also download the data from this table in CSV format, either in full or by any custom parameters.
Custom Content Type for displaying data
Do you want to not only save data but also show it publicly? We should use JetEngine’s listing grid to display this data on the front end.It is necessary to create a new listing grid item and select Subscription CCT as its source. The grid listing is edited the same way as the custom post types by using dynamic widgets or dynamic tags. All we need is to select the data that we want to show and apply styles. Next, you need to add this widget to any static page. Done.
Custom Content Type for advanced filtering
Just displaying the data is fine, but filtering it is even better. To do this, you need to create filters using JetSmartFilters, add them to the listing page and select the required provider.
Custom Content Type for the detailed descriptions
Suppose that in addition to the listing, we also want to show detailed information about the subscribers. To implement this, we can synchronize CCT with a custom post type – in this case, CCT will be responsible for storing metadata, listings, and filtering.
A custom post type will be responsible for displaying single pages. The second way is to use a pop-up that can be configured using JetPopup. We can use the pop-up to display detailed information and as an order form if we are building a custom store. Learn more about how to show detailed information with the help of pop-ups in this video presentation.
It helps you create a WordPress post that is different from a post or page. You can use different layouts, metadata, and options to create what suits you.
Custom content type does not make the site heavy, unlike custom post type. It is due to the peculiarities of saving data. Therefore, you will not notice any change in site loading speed if you create a custom content type.
You can work with it just like with regular posts or pages. If you create a custom content type and name it, for example, “Products,” you will see such a tab in your console and be able to work with it.
You can do it with HTML code. However, since there is no such feature in WordPress by default, you need to extend its capabilities with additional tools.
Conclusion and Next Steps
JetEngine’s Custom Content Type module is a great help if you need to create content that is different from a page or post. With its help, you can add any number of items, which won’t have a toll on the database. Ultimately it means faster queries, faster filtering, and less server resource usage.
Furthermore, the JetEngine supports the REST API, which helps you with broad plugin possibilities:
- create the form on one site and edit CCT items on another site through this form;
- connect the 3rd party application to a site;
- get the data from any application via API key directly to your CCT;
- and much more.
In the further versions of CCT by Crocoblock, we are planning to add:
- Compatibility with map listings
- Indexer support for filters
- Relations between content types (similar to those for post types)
- The ability to output data in table format with filters on the front end
- The ability to output data in graph format on the front end
Have you tried the Custom Content Type module? Was it easy for you to figure out how to use it? Do you find this module useful overall? We look forward to your feedback in the comments below.