With the recent set of hacked WordPress sites, it didn’t take long for a new update to come along and fix the problem. Now the community is trying to spread the word: Update, update, update! Don’t forget to check out our other editorial toons!
Think Like An App
Imagine a client asks you to build them a website and a mobile application so that they can easily sell shoes online. If you’re like me, a nerdy web developer, you’d probably start planning how to get data on every single shoe that’s going to be on the site—there must be some JSON or XML APIs provided by manufacturers, or at least some regularly-updated CSV files, right? This would prompt you think about how to properly import this data into eCommerce platforms that you might use to build the site. Then you’d probably start thinking about how to mass process, validate, […]
Client Side Applications Powered by the WordPress JSON REST API
With the WordPress JSON REST API (or the WP-API) slated to be included in core by the end of 2015, there are lots of different ways people are planning to use it to build cool things. This article takes a closer look at client side applications using the WordPress JSON REST API, and explains exactly why you should be excited about them. Web Applications and MVC The difference between a web application and a traditional website is confusing as the line is often blurred. I won’t get too much into detail, but this article on Vision Mobile can help you better differentiate the two. […]
What you need to know about authentication for the JSON REST API
Update: For more information, you can download our free ebook, The Ultimate Guide to the WordPress REST API. The new JSON REST API is one of the more exciting developments in the WordPress world. One of the parts of working with the API that has generated the most confusion is authentication. In this article I will give you a brief introduction to how authentication works with the REST API and the authentication system provided by the REST API team. I will also introduce some additional tools that will make using them even easier. Understanding authentication with the REST API How authentication works […]
Building the Front-End for the JSON REST API-Powered Single Page Web App
In my last two articles I have discussed how to prepare your WordPress site to act as the backend for a JSON REST-API powered app using a separate, non-WordPress front-end, and I have illustrated how to use Node.js and Express to power that front-end. This article will show you how to get content in and out of the basic HTML layout, and how to use the HTML5 history API to update URLs. As I emphasized in the last article: using a node.js front-end provides a faster front-end experience, which is easier for non-WordPress developers to work with and provides complete separation of concerns for front-end templating. While my example […]
Setting Up a Node Server for a WordPress REST API-Powered Single Page Web App
Update: For more information, you can download our free ebook, The Ultimate Guide to the WordPress REST API. In my last article in this series, I discussed optimizing and preparing your site to serve as the content management system and REST API for a single page web app (SPA) that does not run inside of WordPress. I have packaged those optimizations into a WordPress plugin, called Josie-API, which you can install from WordPress.org. I have also put the complete code that I’ll be walking you through in this article and the next one in a GitHub project called Josie, so if […]
Preparing Your WordPress Site to Power a Single Page Web App
Having a RESTful API in WordPress opens up options for WordPress developers and non-developers alike. Most of my articles on the REST API focus on using it to improve WordPress sites. But one equally exciting thing about having a RESTful API, which we haven’t discussed yet, is that it makes it easier than ever for developers who are not WordPress specialists to create the front-end for a site or app. And all can be done without disrupting the use of WordPress for content management. This should excite developers because, though WordPress shines as a content management system, PHP leaves much to […]
Improving Third-Party API Performance in WordPress with the WP-TLC-Transient Library
Minimizing page load time is incredibly important for both UX and SEO. We spend tons of time obsessing over getting our code and servers optimized to serve our sites as fast as possible, but once you incorporate data from external APIs, you may be putting your site’s load times at the mercy of an external server that you have no control over. Even under the best circumstances, site performance will generally still be an issue when getting data from third-party APIs, due to the additional time required to make extra HTTP requests. For these reasons, it’s important to leverage a caching system […]
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 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 […]
No Comments