There are times when you might want to put a limit on the quantity of a product a customer can have on an order. Maybe you have a product that has low stock and you want to make sure many people get to purchase it, or maybe it’s a product that really does not need to be bought in multiples (like a digital product maybe?).(more…)
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.(more…)
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(more…)
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.(more…)
There is a great post, albeit a bit old (2015) on tutsplus.com about overriding parent functions:
Here is my tl;dr version:
- Even when using a Child Theme, all of your Parent Theme functions will still run.
- The functions in your child theme will be loaded before the functions in the parent theme.
- Priority is very important. Higher priority wins.
- 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!