- Jakub Mikita. Submitting Forms Without Reloading the Page: AJAX Implementation in WordPress. smashing magazine, 2018.
- Fairly extensive article but I found it a bit confusing at times and sometimes too spartan in explaining the code snippets.
- Daniel Pataki. Loading WordPress Posts Dynamically With AJAX. wpmudev, 2017.
- Ren Ventura. Making Sense of Working with AJAX in WordPress. engagewp, 2015. *
- Tom McFarlin. Ajax in WordPress Series. 2015-2016.
- Focuses primarily on creating a protocol for use with WP Ajax rather than WP Ajax itself, if you are looking for a guide to the basics, this isn’t it.
- A Series on Protocols (9/22/16).
- A Strategy for Error Codes.
- Custom Response Messages.
- Procedural Programming.
- Protocol Syntax.
- The Client-Side Ajax Protocol.
- The Server-Side Ajax Protocol.
- Tom McFarlin. Improved Ajax Techniques for WordPress Series. 2015.
- This series is meant as a followup to McFarlin’s 2012 series, see below.
- 1. Procedural Programming.
- 2. Object-Oriented Programming.
- Josh Pollock. Improved WordPress Front-End AJAX Processing. torque, 2014.
- Suggests that using WP’s admin AJAX API isn’t ideal when offering front-end capabilities and offers a way to build one’s own.
- Salman Ravoof. Using AJAX with PHP on Your WordPress Site With Your Own Plugin. wpmudev, 2019.
- Shows how to create a simple counter plugin, uses jQuery.
- Tom McFarlin. Sending Secure Ajax Requests in WordPress (with Nonces). 2017.
- David Hayes. A Crash Course in AJAX in WordPress. wpshout, 2014.
- If you are okay with using jQuery instead of vanilla JS to perform AJAX calls, this is a good article. Doesn’t cover using
wp_localize_script
.
- If you are okay with using jQuery instead of vanilla JS to perform AJAX calls, this is a good article. Doesn’t cover using
- Tom McFarlin. A Primer on Ajax in the WordPress Frontend. envatotuts+, 2012.
- This is in some ways a continuation of McFarlin’s earlier series A Primer on Ajax in the WordPress Dashboard (2012). It creates a nice plugin called I’ve Read This which allows logged in users to see only articles they haven’t yet read.
- 1. Understanding the Process.
- 2. Actually Doing It.
- Abbas Suterwala. Adding Posts to a Site’s Front-End Using AJAX. envatotuts+, 2012.
- Tom McFarlin. WordPress Ajax API Example. 2012.
- Daniel Pataki. How to Use AJAX in WordPress. smashing magazine, 2011.
- Probably want to supplement this with his newer article from 2017 (above).
- Pippin Williamson. Write a “Love It” Plugin with Ajax to Let Users Love Their Favorite Posts / Pages. 2012.
- Pippin Williamson. Post Data with Ajax in WordPress Plugins. 2011.
- Pippin Williamson. Process Ajax Requests Correctly in WordPress Plugins. 2011.
- While quite old this article is still quite helpful.
- Tom McFarlin. Properly Working with Ajax Requests in WordPress. 2018.
- Uses jQuery, discusses avoiding stacking of requests.
- Yojance Rabelo. Adding Ajax to Your WordPress Plugin. sitepoint, 2014.
- Tom McFarlin. Priority of Ajax in WordPress. 2015.
- Tom explains how sometimes one’s code can be “correct” but Ajax still not work, why this occurs, and how to resolve it.
- Jay Wood. Handling AJAX in WordPress in Style. webdevstudios, 2015.