Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

Building a Headless WordPress App with REST API

via LinkedIn Learning

Overview

Learn how to build a headless app—a standalone app that uses WordPress as a back end—using OAuth2, JavaScript, and the WordPress REST API.

Syllabus

Introduction
  • Building a headless app with the WP REST API
  • Prerequisites for this course
1. Plan the Application
  • Introduction to the Task Book app
  • Content model for the application
  • User flow for the application
2. Extend Core WordPress Functionality
  • Create a functionality plugin
  • Add custom post type for tasks
  • Create new roles
  • Create new capabilities
  • Test the REST response
3. Create New Meta Boxes and Fields
  • Create a status field
  • Set status field automatically
  • Add CMB2 for custom meta boxes
  • Create a custom meta box and fields
  • Display REST fields using CMB2
4. Authentication with OAuth2
  • Install and configure the OAuth2 plugin
  • Send authenticated requests to the REST API
  • Restrict REST access based on roles
5. Set Up the Headless App
  • Review of user flow
  • JavaScript modules and structure
  • Login by requesting a token
  • Set up the authorization loop
  • Set up the logout loop
  • Request and display latest 10 tasks
  • Request and display single tasks
  • Send POST request on new/update task
  • Display a chart based on task data
Conclusion
  • Further information

Taught by

Morten Rand-Hendriksen

Reviews

Start your review of Building a Headless WordPress App with REST API

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.