WordPress and Ajax Chapters
WordPress and Ajax 3rd Edition is being written in the open. Leave feedback in the form of comments so I can shape the book towards the reader. The chapters are in chronological order (oldest to newest).
Here’s an example PDF of my WordPress and Ajax book.
An introduction to how actions and filters work within WordPress. This is an excerpt from the upcoming WordPress and Ajax book.
Building a simple WordPress plugin is just as simple as adding a file or folder to the to your plugins directory, which is found under wp-content/plugins. In this chapter, we’re going to build a simple plugin, which will serve as the architecture for later modifications.
In this chapter, I show you how to add scripts to WordPress properly.
In this chapter I’ll show you how to load styles properly and show you an example based on a shortcode.
Wouldn’t you like to not load scripts and styles on every front-end page and admin page? This chapter goes over WordPress conditionals.
Within this chapter I go over several techniques for loading scripts and styles. I also go over how to remove scripts and styles from a WordPress plugin.
This chapter covers WordPress nonces, how to implement them, why they are useful, and why you should use them.
Data validation in WordPress is extremely important. It’s necessary to escape and sanitize everything. Do not trust anyone, especially yourself.
Admin Ajax is now a standard way to perform Ajax requests. It has its advantages and disadvantages, and we build a sample plugin to show it off.
The REST API is an alternative to Admin Ajax. It is a programming-language agnostic way of interacting with WordPress data and is more structured.
This chapter covers setting up Node and NPM. It shows how to add Create Guten Block to an existing plugin, and how to create a few Gutenberg blocks.