Making PHP Variables Available to Your JS

If you have ever written a plugin that uses any form of Javascript, you will probably have come across the problem of passing configuration options from PHP to Javascript. Take an image slider plugin, such as Soliloquy for example: most likely there is a settings page of some kind that lets the user set the…

Introduction to the WP_Error Class

WordPress has a class called WP_Error that provides a really simple way for developers to track errors while processing data. The class mystified me for a long time, but once I figured it out, it is extremely simple to use, and saves a ton of time when attempting to record errors while processing data of…

The add_query_arg() Helper Function

WordPress includes a lot of helper functions that can make your life as a developer much easier. One function in particular that I really love is add_query_arg(), which provides an extremely simply way to append query variables to any URL. Query vars, in case you’re not familiar with them, allow you to perform any number…

Creating WP List Tables by Hand

The WP List Table is what we call the table of data that is displayed when you click on any post type in WordPress. For example, click on Posts and this will display a table listing all of the posts (or perhaps the latest 20) that you have created in WordPress. In this tutorial, we…

Build an À la Carte Premium Tutorial Shop

There are a lot of premium membership tutorial sites out there, this one included, and they usually require that memberships purchase a subscription to the site in order to access the premium content. In this tutorial, I’m going to walk you through the process pf creating an À la Carte tutorial site that lets users…

Introduction to the gettext Filter in WordPress

The gettext filter gives us a really easy way to change text anywhere in our WordPress install, including plugins and themes, without ever changing any of the original code. It is a great way to easily customize labels, headings, button text, and any other text we wish to change.

Add Comment Status Links to Comments Menu

I have always thought it was a little odd that the Comments menu in the WordPress dashboard did not have any sub menu items. For example, I think it makes sense to include sub menu items for each of the comment status: Approved, Pending, Spam, and Trash. But since WordPress doesn’t include these, it is…

Loading Scripts Correctly in the WordPress Admin

There has been a lot of talk over the last two days about loading scripts, particularly jQuery, correctly in WordPress themes and plugins, and anyone who follows me on Twitter probably knows that this is an issue I bring up a lot. When providing support for my plugins, I discover themes (and plugins) that are…

Playing Nice with the “the_content” Filter

One of the very first things people tend to learn when writing plugins is how to attach custom HTML to the bottom of their WordPress posts using the filter called “the_content”. This is good, as it is an extremely useful filter, but rarely do tutorials really explain how to use this filter well, and how…

Adding Custom Fields to the Easy Digital Downloads Checkout

Easy Digital Downloads is a plugin I have been building for selling digital downloads through WordPress. It is completely free and very flexible. Due to a large number of actions hooks and filters, there are many ways that you can customize the plugin to best suit your needs. This tutorial will walk you through the…

Create a Simple Campaign Monitor Signup Form

Campaign Monitor is an email newsletter service built primarily for designers. It is definitely one of the most used email list services, along with Mail Chimp and Aweber. This tutorial is going to cover the basics of working with Campaign Monitor’s API by creating a basic newsletter signup form.