WP JSON API – how to extend it

Slides as presented at WordCamp Toronto, 2016

In this talk, I demonstrate how to use the WP JSON API to add your own end-point for a custom post type or add/change data being returned.

I walk you through example code that extends the API and show you how simple it can be and how few lines it takes once you get your head around it.

Learning Outcomes

  • expose a custom post type in the API
  • view the output of the API
  • send date to the API
  • save data sent to the API
  • return custom data to an API call