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 - WordPress Tutorial
From the course: WordPress: REST API
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Four practical examples1m 24s
-
Read only: Load next post using REST API8m 23s
-
Cookie authentication: Front-end editing6m 21s
-
Basic standalone app7m 22s
-
JWT authentication: Third-party editing7m 13s
-
Challenge: Add dynamic related posts navigation4m 32s
-
Solution: Add dynamic related posts navigation5m 7s
-
-