Spooky WordPress: Working with the WordPress White Screen of Death
Halloween’s coming up, and it seems like a good time to remember all the moments of abject terror WordPress has brought into my life. Programming in WordPress is fun for the most part, but, especially...
View ArticleWhy, When, and How to Make Your Own Template Tags
One of the great things about WordPress is that there are a lot of things that work the way you’d expect. You might not have the foggiest idea what WordPress does under the hood — that it’s pulling...
View ArticleDead-Simple Migration for WordPress Multisite Networks, by ServMask
We’ve written at length about our love for All-in-One WP Migration, a beautifully simple and easy-to-use tool for WordPress site migration. The plugin is under active development by ServMask, which...
View ArticleCore Concepts of WordPress Themes: Processing Posts with The Loop
We recently released Up and Running, our multimedia guide to WordPress development. We think it’s the best way to learn the technical side of WordPress: we don’t skip steps, and we make learning each...
View ArticleWordPress Caching: The Six Different Things People May Mean
“Caching” is, generally, the solution you hear offered for most performance problems a WordPress site has. For things other than WordPress sites, too, caching is one of the easiest and most effective...
View ArticleWhat $wpdb Is, and Why I Try Not To Use It
More than half of what matters about a WordPress site is stored in its (typically MySQL) database. Why? Because WordPress stores all its “content” in the database. For most people, that makes it even...
View ArticleMake Your Site Faster with Async and Deferred JavaScript: Introducing...
Today I’m going to discuss a new, and very nice, site speed improvement that became possible in WordPress 4.1. What changed? The introduction of a new filter, script_loader_tag. This filter lets us...
View ArticleSorting and Ordering Nested Data in WordPress: Fun with PHP Arrays and usort()
Working with nested data structures like WP_Query‘s “objects inside arrays inside objects” can be complicated. I’ve been doing some work for clients that involves a lot of digging around in site data,...
View ArticleGentle Introduction to Functional PHP for WordPress Developers: Using Filter...
Fred’s post last week was about filtering through arrays of posts and ordering them. He foreached through arrays, and then used PHP’s usort() function to get a list of alphabetized posts with comments...
View ArticleUsing WP_Query Objects Without the Loop
I really enjoyed David’s article from a few weeks ago on the basics of functional programming as it applies to WordPress’s nested data structures. One of the nice things about working with him is that...
View ArticleUp Periscope: Practical Uses of print_r() in WordPress Development
By default, you can’t look directly at PHP processing, only at its effects. A persistent need in programming is to know exactly what’s going on with your code. This can be especially tricky in...
View ArticleHow To Stop a Post Publishing in WordPress with PHP
Last time, we talked about how the Require Featured Image plugin stops a WordPress “post” from being published without a feature image attached in JavaScript. That approach is limited (as a few...
View ArticleUnderstanding PHP Globals and Variable Scope in WordPress
One of the most maligned features of WordPress is the rampant use of “globals variables.” There are huge decades-long discussions in software development circles about why heavy reliance on globally...
View ArticleUnconditionally: Refactoring Nested If-Statements for Cleaner Code
There’s a lot to say about writing clean code: Earth’s smartest people have spent a hundred or so years discussing the topic, and it doesn’t look like they’re winding down. As deep as the subject is,...
View ArticleBut Seriously, What is a REST API Anyway?
Despite all the hubbub that has been going on about the chronically forthcoming WP REST API, there is one crucial thing that I think a lot of WordPress developers may not fully understand: What the...
View ArticleHow To Stop a Post Publishing in WordPress with PHP
Last time, we talked about how the Require Featured Image plugin stops a WordPress “post” from being published without a feature image attached in JavaScript. That approach is limited (as a few...
View ArticleUnderstanding PHP Globals and Variable Scope in WordPress
One of the most maligned features of WordPress is the rampant use of “global variables.” There are huge decades-long discussions in software development circles about why heavy reliance on globally...
View ArticleUnconditionally: Refactoring Nested If-Statements for Cleaner Code
There’s a lot to say about writing clean code: Earth’s smartest people have spent a hundred or so years discussing the topic, and it doesn’t look like they’re winding down. As deep as the subject is,...
View ArticleBut Seriously, What is a REST API Anyway?
Despite all the hubbub that has been going on about the chronically forthcoming WP REST API, there is one crucial thing that I think a lot of WordPress developers may not fully understand: What the...
View ArticleMaking Custom REST Routes In WordPress 4.4 and Beyond
In WordPress 4.4, some significant parts of the long awaited REST API made it into WordPress core. While for many use cases you’ll probably need to keep using the plugin until at least WordPress 4.7...
View Article