Join Morten Rand-Hendriksen for an in-depth discussion in this video Create the HTML output for the AJAX function, part of WordPress REST API (WP-API): First Look (2015).
- In the previous movie, we created the Ajax function…that automatically grabs the related posts…and outputs the titles underneath the content…once we trigger the button.…Now is time to change that HTML output…so that outputs actual boxes…with actual links and get everything to work properly.…To do that, we're gonna alter this output here…and append a lot of extra HTML.…I'll start of by creating a new variable…inside my each loop.…I'll call it var related loop,…and then this variable will contain…all of this HTML.…
With the WP API, developers can access the data on a WordPress site—such as users, posts, and categories—programmatically. The result is an expansion of the already limitless field of possibilities where theme and plugin development is concerned.
This course is a first look at the WP API: what it is, how to get it running, how to interact with it, what it can do for us, and what we can do with it. Join Morten Rand-Hendriksen, your guide and WordPress guru, as he walks through the tools and major features (such as routes and endpoints) of the WP API, as well as a short project that shows how this new API will be used in real-world workflows.
- Installing the WP API
- Exploring common routes
- Examining WP API output
- Building plugins with the WP API
- Crafting WP API URL requests
- Creating AJAX functions with the WP API