And here we'll start out by writing some basic jQuery.…So I'll just create a very simple function that triggers…a console.log any time someone clicks the button,…so that we are sure that everything…is hooked together properly.…I'll start out by creating a function,…the function target $, and is jQuery.…And within the function we're going to…create an action anytime someone clicks on…the link that has the class "get-related-posts."…So I'll say…"$('.get-related-posts')…".on…"( 'click', function(event)"…because we're capturing the event,…and the event is "preventDefault"…and on that event we prevent default…so that the page doesn't jump up to the top…
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