- 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.
- Tom McFarlin.
- Properly Working with Ajax Requests in WordPress. 2018.
- Uses jQuery, discusses the basic function and using
.done
,.fail
, and.always
. - Sending Secure Ajax Requests in WordPress (with Nonces). 2017.
- Uses jQuery, discusses the basic function and using
- Properly Working with Ajax Requests in WordPress. 2018.
- Daniel Pataki. Loading WordPress Posts Dynamically With AJAX. wpmudev, 2017.
- See also Pataki’s 2011 How to Use AJAX in WordPress article on Smashing Magazine.
- 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.
- Custom Response Messages (9/8/15).
- A Strategy for Error Codes (9/9/15).
- Procedural Programming (11/12/15).
- Priority of Ajax in WordPress (12/3/15).
- Tom explains how sometimes one’s code can be “correct” but Ajax still not work, why this occurs, and how to resolve it.
- A Series on Protocols (9/22/16).
- Protocol Syntax (9/23/16).
- The Server-Side Ajax Protocol (9/26/16).
- The Client-Side Ajax Protocol (9/27/16).
- Tom McFarlin. Improved Ajax Techniques for WordPress Series. tutsplus, 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.
- Yojance Rabelo. Adding Ajax to Your WordPress Plugin. sitepoint, 2014.
- 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.
- Jay Wood. Handling AJAX in WordPress in Style. webdevstudios, 2015.
- 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 short 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 short 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.
- Pippin Williamson.
- Post Data with Ajax in WordPress Plugins. 2011.
- Process Ajax Requests Correctly in WordPress Plugins. 2011.
- While quite old this article is still quite helpful.
Project Tutorials
- Pippin Williamson. Write a “Love It” Plugin with Ajax to Let Users Love Their Favorite Posts / Pages. 2012.