What is a child theme in WordPress and why use it?

A child theme uses another theme (the parent) as its base. It needs a style.css with a Template: line (the parent folder name) and usually a functions.php.

/*
Theme Name: My Child Theme
Template: twentytwentyone
*/

Any file you copy to the child with the same name replaces the parent file. The rest comes from the parent. The main reason to use it: when the parent theme is updated, your changes stay safe. See WordPress Child Theme.


Learn more about the similar topics:
Tutorials
No Content Found.
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.