Link Category: Tutorials

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 theming blog — goes into a lot of detail about what their theme team has done to get their themes ready for it.

Adding an is_product_subcategory() Conditional Tag to WooCommerce

wp mayor | is_subcategory

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

cache pallets | cache wp_query

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

css3 masonry layout

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.