From the course: WordPress: REST API

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Cookie authentication: Front-end editing

Cookie authentication: Front-end editing - WordPress Tutorial

From the course: WordPress: REST API

Start my 1-month free trial

Cookie authentication: Front-end editing

- [Instructor] When we use the REST API within the context of WordPress, either on the back end or on the front end, we can piggyback off WordPress its own authentication system to send authenticated requests, and access the full CRUD capabilities of the API. In the exercise files for this new theme, you'll find a plug-in that adds front-end editing capabilities to the 2020 theme, using cookie authentication, nonces, and the REST API. To see how this all works, first go to the exercise files and find the folder called rest edit, place this folder inside the plugins folder, in your locally hosted WordPress site in your development environment, then go to the backend of your WordPress site, go to appearance and themes, and make sure you have the 2020 theme activated, then finally go to plugins, and activate this new plug-in front-end editing via the REST API. Now we can jump to the front-end and see what this plug-in…

Contents