-
Book Overview & Buying
-
Table Of Contents
Learning WordPress REST API
By :
As we start with our tutorial, it is very important to firstly focus on the previous chapters of this book and make sure you have fully understood your way through the process of creating posts by making POST requests to the posts endpoint. In this chapter, you will be doing something similar, but instead of using the WordPress HTTP API and PHP, you'll use jQuery's AJAX methods. All of the code for that project should go in its plugin file. Another important tip before starting is to have the required JavaScript client installed that uses the WordPress REST API. You will be using the JavaScript client to make it possible to authorize via the current user's cookies.
As a note for this tip would be the fact that you can actually substitute another authorization method such as OAuth if you find it more suitable.