May 2017
Beginner to intermediate
536 pages
14h 25m
English
In the previous chapters, we discussed the importance of custom post types in web applications compared to normal posts. Similarly, custom post types play a vital role in REST API as well. However, custom post types are not enabled by default in WordPress REST API. So, we have to apply the necessary settings and enable them as needed for our applications.
We can try whether given custom post type is enabled using the http://www.example.com/wp-json/wp/v2/{custom post type} format in our Postman app. Since REST is not enabled by default, you should get the following response:
{"code":"rest_no_route","message":"No route was found matching the URL and request method","data":{"status":404}}
So, we have to enable ...
Read now
Unlock full access