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:
- 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!
Leave a Reply