Creating a Child Theme
Why Direct Theme Edits Are Risky
Editing a parent theme's files directly is risky because any future theme update can overwrite your changes completely. A child theme solves this problem safely.
What Is a Child Theme?
A child theme inherits all the styling and functionality of its parent theme while allowing you to override specific files.
It lives in its own folder and stays completely separate from the parent theme's core files.
Steps to Create a Child Theme
Create a new folder inside wp-content/themes/, for example my-theme-child.
Add a style.css file with a comment header specifying the Template field pointing to the parent theme's folder name.
Add a functions.php file that enqueues the parent theme's stylesheet, then activate the child theme from Appearance > Themes.
| File | Purpose |
|---|---|
| style.css | Defines child theme info and the Template reference |
| functions.php | Loads parent styles and adds custom functionality |
| Template header | Links the child theme to its parent |
With themes covered end-to-end, it's time to look at the other major building block of WordPress customisation: plugins.
Ready to master WordPress Training Course?
Join Uncodemy's hands-on, mentor-led WordPress training and build real, live websites.