Managing custom routes and endpoints

The real power of REST API comes with the usage of custom routes and endpoints. There are certain limitations in adjusting existing routes and endpoints to our requirements. In some scenarios, we may have to create our own classes and extend the WordPress core classes to achieve custom functionality. So, custom routes and endpoints allow us to implement custom REST API features with minimum work, without interfering with WordPress core REST API features.

In this section, we are going to implement the following features to learn the basics of custom REST API routes and endpoints:

  1. Disable the default post endpoint and use custom routes to expose posts only in selected categories with selected post data ...

Get WordPress Development Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.