If you’re customizing a WordPress Theme, a child themes is critical to ensure your site and theme stay up to date. Unfortunately, not all themes are developed with child themes in mind. The most common things I tend to change in a parent theme are the includes (javascript files and css files). If the parent theme isn’t using wp_enqueue_script() or wp_enqueue_style()… well, you’re screwed. Find the author of the theme and yell at them for being lazy (or find the theme on GitHub and fix it yourself!).

Assuming the parent does use wp_enqueue_script() or wp_enqueue_style(), overloading it’s includes can be done by placing this in the child theme’s functions.php. Be sure to change ‘font-awesome’, ‘hover-script’, and ‘main-script’ to the names of the styles/scripts that were enqueued in the parent.

Leave a Reply

Your email address will not be published. Required fields are marked *