Join Morten Rand-Hendriksen for an in-depth discussion in this video Final touches, part of WordPress REST API (WP-API): First Look (2015).
- And that, my friends, is it.…No, of course not, because it looks kind of messy right now,…I mean, we have this URL up here,…and then when you click on the button,…you get all this stuff in the console,…and things are not clean.…So before we wrap this up,…let me show you how to clean this up,…and also add some extra pinache and finesse…to this so that it looks really nice.…The first thing we're going to do…is get rid of all this extraneous stuff we don't need.…So, I'll go to "go futher on php" and scroll down…to the html output that we find down here,…under "baseline,"…and take out this reference to the URL.…
So, that should remove the URL in the HTML output,…and that makes a huge difference already.…Next, I'll go into the AJAX file and take out…all these console log requests,…because we don't need to see what's coming out anymore,…because we know that everything is correct.…And that will clean up our console.…So, I'll take all that out,…save it,…reload,…click the button,…no console logs, everything's great,…and then, we can start improving the user experience.…
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