How to Create a Child Theme
As online sellers or as e-commerce developers/maintainers, we sometimes need to buy themes from a marketplace, or we are simply provided with an existing theme for the website we are working on. Very often, we need to modify the theme template structure or some assets. A simple way to solve this would be to find the template responsible for what we have to modify and to change the code directly to obtain what we need. But this is not a best practice!
Indeed, our theme change would be completely overwritten by patch updates. We shouldn’t act directly on a theme that is not ours; think about what would happen if no backups of the original theme were executed. The solution to this need for theme customization is the creation of child themes.
Let’s learn how to create child themes by following these steps:
- Discovering what a child theme is
- Creating a child theme structure
- Installing and testing our child theme example