Adding WordPress REST API support
The pending WordPress REST API has been a hot topic for WordPress developers and agencies for awhile now. While it’s true the endpoints are not presently merged into WordPress core, the framework needed to create endpoints are, making them able to be manually added by developers, coupled with having the
REST API plugin installed and active.
With the release of Custom Post Type UI 1.2.0 in January 2016, we added the ability for you to add support for your custom post types and taxonomies. There are two fields you need to be aware of, for both post types and taxonomies
“Show in REST API”
The “Show in REST API” field is one of our true/false drop-downs, and it defaults to false. You will want to set it to true and hit save on any of your desired post types and taxonomies to enable the support for that content.
“REST API base slug”
This “REST API base slug” field is what you use to set what slug to reference when interacting with the API endpoints. By default, it is the post type slug that you register. However, you can set it to be something else if you like. If you have a post type of “movies” and want to reference it by “films” then you’d save “films” in the field before saving.
That’s all you need!