6️⃣ Custom Post Types
Although WordPress started out as a blogging platform, it has since developed into a full featured Content Management System (CMS). Part of what makes it so useful as a CMS is it's support for Custom Post Types (CPT). This enables WordPress to host arbitrary data, beyond the default posts and pages.
Frontity is able to work with Custom Post Types, and in this section we'll see how we can use them in our project.
As you will already be aware, our example source data is a travel blog. We have implemented a Custom Post Type in WordPress for our favourite destinations. This CPT is called... "destinations" - what else?! 😄
We've also ensured that the CPT is available in the REST API for consumption by our Frontity project.
This section only contains one lesson. That is because it is remarkably easy to get our project to use CPTs, as we're about to see...