Categories
Performance

Performant WordPress Queries

Querying posts can be tricky. There are many ways to fetch content, and it’s not always clear what will give you the most benefits. The answers I’ve seen are also not always straight-forward and the “why” is not always explained.

Here’s my attempt to give basic advice on how to write performant WordPress Queries.

Categories
Plugins Storefront

Plugin: Storefront Hooks Customizer

While working with Storefront over the past years, one common request I see is that folks need a way to “insert” other content into areas that might not always have a Widget or content area.  I wanted to make a solution that was more friendly, especially to folks that might not be comfortable with writing

Categories
Uncategorized

How to override WooCommerce Image Sizes

Image sizes are not always fun to deal with in WordPress.

Where are they set?  Where do I change them?  Why are my images not showing up as the right size?

In this guide, we’re going to cover all the basics of how image sizes are set, and how to override each individual image size to make sure your site has the right image sizes you need.

Categories
Resources

Overriding Parent Functions from a Child Theme

There is a great post, albeit a bit old (2015) on tutsplus.com about overriding parent functions:

A Guide to Overriding Parent Theme Functions in Your Child Theme

Here is my tl;dr version:

  1. Even when using a Child Theme, all of your Parent Theme functions will still run.
  2. The functions in your child theme will be loaded before the functions in the parent theme.
  3. Priority is very important. Higher priority wins.
  4. If you are simply removing an action or filter, you need to do it from inside a function because that will ensure it runs AFTER the parent one has run.

As someone who often edits other people’s themes, these are very useful tools to know!

Categories
Default Themes Hooks

Simply Show Hooks and How to Use Them

Back in the day, I used to do a lot of client sites using things like the Genesis Framework and Canvas.  I would use a child theme to make CSS style changes and add functions to add in other aspects of the site without having to manually edit templates.

In this tutorial, we will go through how to find a theme’s hooks and how to add content to them.  We’ll use Twenty Seventeen as the example theme.