WordCamp London 2015 was packed full of excellent presentations, lightning talks, and panels. For several of the more technical sessions, attendees were actually turned away at the door due to the rooms being filled to capacity. This was the case for Jack Lenox’s presentation on Building Themes with the WP REST API.
“I was overwhelmed by the popularity of the talk,” Lenox said in his recap post. “I think there were over 200 people crammed into the room, and many more ended up getting turned away.” A photo captured just before the session shows how crowded the room was with attendees eager to learn about building themes with the WP REST API.
When asked for a link to his slides, Lenox found that they didn’t communicate much on their own without the presentation, a common drawback to viewing the slides by themselves. The session should make it onto WordPress.tv sometime soon, but in the meantime he created a screencast for those who couldn’t attend.
The video is actually an extended edition of his talk and runs for a full 50 minutes. Lenox starts by answering the question, “What’s the big deal about the REST API?” He also demos the speed of getting content from the API using a few live examples.
His presentation offers theme developers a few reasons for why they may want to look into building themes that use the WP REST API:
- Provides a way to retrieve pure data (usually in JSON or XML format) over HTTP
- No loops necessary
- Good for mobile apps and environments where you don’t want a full webpage to render but want content from a blog or site
The Picard theme that he demos is aptly named as a play on the next generation of themes. It’s a prototype WordPress theme built with React and the upcoming WP-API. If you want to play with it, you can clone the repository on GitHub. Automattic is aiming to open source the Picard theme around the beginning of May.
Interest surrounding the presentation demonstrates how excited the WordPress community is to start incorporating the new API into their projects. Many who attended the session at WordCamp London were inspired to start looking at themes in a new way.
The resulting experience of pre-loading all the content allows users to zip around without any delay. It’s a dramatic improvement and an amazing example of how a theme can have much more control over the speed and resources needed to present content on the frontend. If your interest is piqued, check out Jack Lenox’s extended edition video for the full technical breakdown.
This is exactly the sort of information I was looking for with regards to the new WP REST API. A lot of focus has been on its use in applications so far. I was always wondering whether / how it could be used effectively for theming purposes.