Update: For more information, you can download our free ebook, The Ultimate Guide to the WordPress REST API In my article on the future of WordPress, I wrote about how the introduction of a JSON RESTful API to WordPress core will radically expand WordPress’s reach and capabilities. What is so exciting about this new REST API — which is currently available as a plugin, and slated to be included in WordPress 4.1 — is its ability to use it to not only display content from other WordPress sites, or even other applications entirely, but to save content from other sites, whether they are […]
Introduction to the JSON REST API Part 2
Update: For more information, you can download our free ebook, The Ultimate Guide to the WordPress REST API In last week’s article, I showed just how easy it is to use the new WordPress REST API to get posts from a remote site. In this article we’re going to build on what we learned last week and use the REST API to copy posts from one site to another. First I’ll show you how to create a post in a site with data sourced from a remote site via the REST API. Then I’ll show you how to take a post […]
Processing Forms with AJAX Using the JSON REST API
Update: For more information, you can download our free ebook, The Ultimate Guide to the WordPress REST API. In this article, I’m going to demonstrate how to write a simple plugin to create and edit posts using the JSON REST API. While this could be the basis of a cool, front-end editing plugin — with the addition of some fields and CSS, and the implementation of the TinyMCE or similar, of course — the point isn’t to reverse the engineering of the WordPress post editor, but rather to introduce you to processing form data using the REST API and AJAX. After you understand how […]
Working with Taxonomies Using the JSON REST API
Update: For more information, you can download our free ebook, The Ultimate Guide to the WordPress REST API. Over the last few months I’ve provided a series of tutorials on how to use the WordPress REST API. I’ve covered topics on how to retrieve and create posts, and even how to work with post meta data and how to create a front-end post editor. And, because the term “post” is so broad, it applies to virtually any post type, and therefore covers a large swath of the REST APIs capabilities.. The two major data types I haven’t yet addressed are 1) taxonomies and 2) users. Today, […]
Working with Meta Data Using the JSON REST API
Update: For more information, you can download our free ebook, The Ultimate Guide to the WordPress REST API. In my previous articles on the JSON REST API, I focused primarily on retrieving and editing posts — both from the current site and from a remote site. In this article, I’m going to branch out a bit and focus on post meta. I’ll be covering how to edit and create meta fields using the API, and how to search for them. Before We Begin There are a lot of ways to add and edit custom fields — i.e., meta data — in WordPress. Though […]
21 Comments
Join the conversation