Wordpress as API

Brian Hoke | @bentleyhoke

There will be code.

Origin Story

Me

Background

Education

Teaching

Bentley Hoke

WP, Rails, JS, Project Management

Development, Project Management, Training

Home & Office

woman with two kids treadmill desk

Origin Story

Topic

Rails, symfony

MVC Frameworks

Syndication

Mashups

Separation

Benefits: division of labor, maintenance, syndication

Exposing Content

Via JSON; RESTful

JetPack - settings | sample
JSON API - settings | sample

Demo Sites

WP site; twentythirteen; JSON API

Local PHP site (not WP)

Local Rails site

3 Examples

1. Embeddable Widget

Widget on sidebar

Options for users to embed

Syndicates on foreign site

2. Google Map

Retrieve category "locations"

jQuery interation over posts, add marker/infowindow

3. Rails App

HTTParty

Retrieve content for each page, matched by URL

Stores none of its own content

Next/More

Content-modifying use of API

Custom developed

Questions & Code

Code for demos up soon @bentleyhoke

Questions?