Link Category: Tutorials
As Gutenberg gets closer, more and more people are trying to wrap their head around it. Zac Gordon’s Gutenberg development course is perfect if you’re really getting into it. But if you’re just looking into how to get started, this blog post he made a few months ago is as relevant and accurate as ever.
An Introduction to Styling Themes for Gutenberg
This is a great little post about the process of making a theme compatible with the much-discussed Gutenberg editor slated to come out in WordPress 5.0. ThemeShaper — the (maybe) official WordPress.com theming blog — goes into a lot of detail about what their theme team has done to get their themes ready for it.
Get Around Your ISP’s DNS Cache with Google’s Public DNS
If you’ve ever migrated a WordPress site to new hosting, you know that one of the many ways the process can turn confusing is DNS caching by your internet service provider (ISP). It looks as follows:
Adding an is_product_subcategory() Conditional Tag to WooCommerce
I’ve got a project that needs to treat WooCommerce category pages differently from its subcategory pages. Both use taxonomy-product_cat.php, though. What I’d really love to do is change just the search field in that template, depending on whether a particular page is showing a top-level category or a subcategory.
Workarounds for WordPress 4.9 Template File Caching
Caching is a devil’s bargain: it makes things faster by showing you old versions of those things. This results in many of the most frustrating debugging experiences of a developer’s life; in my work, if something’s broken, the explanation is caching until proven otherwise—much like the default explanation for loose ends in the Star Wars universe is the Force.
How to Modify WordPress Search Results on Specific Pages
WordPress’s search functionality is a bit of a dark corner for me—I think because Google search makes every other form of search look a bit old-school and less exciting to learn deeply. But the advice in the linked article really helped me on a recent client project, where I needed the search form on one set of pages to only return posts from a specific category.
Adding Custom CSS Classes to WordPress Menu Items
Here’s something that I assumed required a plugin: How can you add one or more CSS classes to a WordPress menu item?
Essentials of Image Optimization, a Free Guide
I’ve been thinking more and more about web performance, both for making WPShout as fast as possible and for a few other ideas we’ve got stewing. So I was really interested to come across this image optimization guide from Addy Osmani. Aside from the basic fact that Addy’s been one of the leading educators in page-speed for the last feverish years, it’s also worth checking out the guide because it’s darn good and completely free.
Getting Autosave In Sublime Text
I was recently bitten by the lack of saving in my text editor of choice, Sublime Text (3). I don’t know if it’s that PHPStorm has autosave, or that Google Docs does, but at some point in the last few years I lost the reflexive and regular keyboard-shortcut hitting of CMD+S. But it turns out, there’s a simple Sublime Text setting that you just need to toggle. "save_on_focus_lost": true is exactly what I needed to get the desired level of auto-save.
Don’t Cache WP_Query Objects (and Why Not)
Recently, I was working on site speed for a client with one page that makes a large number of custom database queries through WordPress’s WP_Query API.