Difficulty: Intermediate

Defer Parsing of JavaScript in WordPress

It’s a common complaint when you run your WordPress site through any “page speed score” tool: “defer parsing of JavaScript” and/or “remove render-blocking JavaScript.” Today, building on an article Fred first wrote in 2015, I’m going to discuss a was to solve that. It’s been possible since WordPress 4.1, which introduced of a new filter, script_loader_tag. This filter lets us easily change the HTML markup of enqueued script elements—that is, of JavaScript files that were correctly added into a WordPress site using WordPress’s wp_enqueue_script function.


Using Custom Taxonomies and Custom Fields in WordPress Development

This course covers the key points of two of WordPress’s most powerful APIs for defining custom post data: custom fields (also called post meta), and custom taxonomies. The course introduces each tool, and then—since some problems can be addressed by either tool—covers practical guidelines for when to use custom fields and when to use custom taxonomies.


How to Enlarge an Image in WordPress (Lightboxes!)

Whether you’re writing about technical topics or something even more visually demanding like art, sometimes you just want to make a picture bigger in WordPress. That can mean a number of things, from how it appears on the page to what happens when you click it. We’ll shortly cover the first case, and then spend most of our time introducing using a “lightbox” from the Simple Lightbox plugin to make our images appear over our content in a large size when clicked.






Quickly Add Code Snippets in WordPress

nested conditionals sad

Debates have raged for ages—and still rage—about how to think about code on a WordPress site. Some people are fast-and-loose types who just want it working quickly as possible. For people in a hurry, the Code Snippets plugin is a quick and effective way to build and manage small quick “WordPress hacks.” While I still think file-system access is a better idea for writing WordPress PHP, I can’t deny the quickness of this (or any) PHP code snippets plugin.