A child theme is a theme that inherits the functionality and styling of another theme, called the parent theme. Child themes are the recommended way of modifying an existing theme.
A child theme consists of at least one directory (the child theme directory) and two files (style.css and functions.php), which you will need to create:
- The child theme directory
The first step in creating a child theme is to create the child theme directory, which will be placed in wp-content/themes. It is recommended that the name of your child theme directory is appended with ‘-child‘. You will also want to make sure that there are no spaces in your child theme directory name, which may result in errors. In the screenshot above we have called our child theme ‘foundation-child’, indicating that the parent theme is the Foundation theme.
The next step is to create your child theme’s stylesheet (style.css). The stylesheet must begin with the following (the stylesheet header):
Theme Name: Foundation Child
Theme URI: http://foundationtheme.tadam.co.il/
Description: Foundation Child Theme
Author: Adam Pery
Author URI: http://foundationtheme.tadam.co.il/
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: foundation-child