Building Themes with the WP REST API
summary
WordPress core REST API returns JSON at WP-JSON/posts (or /posts/17) so a theme can fetch full post content, featured image and comments and render it client-side with JavaScript. Examples include an Angular news front-end, Quartz on wordpress.com and a local proof‑of‑concept Picard theme built with vanilla JS/React, Browserify and Gulp that shows instant navigation, keyboard controls and instant comment posting using localStorage caching and optional ServiceWorker offline support while preserving an index.php loop for SEO and non‑JS users.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 0:33Demo
- 4:47Overview
- 5:11What is the REST API
- 7:02How does this relate to WordPress
- 8:40What does it look like
- 10:56Whats the big deal
- 11:57JavaScript frameworks
- 13:28The two supercomputers
- 14:59What is a single page application
- 16:13Gmail
- 17:55Theme Customizer
- 18:39REST API verbs
- 19:50Building themes with the REST API
- 20:39Benefits of the REST API
- 24:09How can you get started
- 26:08Ideas
- 28:01JavaScript
- 30:12React
- 30:41React Demo
- 32:04JavaScript Based Theme
- 36:24Questions
