A basic child theme starts with a style.css file, of which you open a text editor (such as Notepad in Windows, NOT Wordpad or MSWord!!) and type a style header in, similar to this…
/*
Theme Name: Twenty Fifteen Child
Theme URI: https://example.com/twenty-fifteen-child/
Description: Twenty Fifteen Child Theme
Author: John Doe
Author URI: https://example.com
Template: twentyfifteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: responsive-layout, accessibility-ready
Text Domain: twenty-fifteen-child
*/
…then change the theme name, theme uri, description, author, and author uri to what is relevant to you.
Then, considering the parent theme you are going to use, which is your current theme, you change the template (your current theme name).
The text domain – notice how this is the same as the child theme name but in all lower case and hyphens (no spaces).
Save this as “style.css” in a folder named exactly as what you wrote for the “text domain”.
Next, open another blank, put this…
<?php
function theme_enqueue_styles() {
$parent_style = 'parent-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style )
);
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
…at the very top with no spaces before or after it.
Change both instances of “theme_enqueue_styles()” to “your-child-theme-name_enqueue_styles()” – the one at the beginning behind “function” and the one at the bottom inside “add_action(“.
There can be no hyphens in this. Change any hypens to underscores.
Change ‘parent-style’ to ‘whatever-your-current-themes-name-is’.
Change ‘child-style’ to ‘whatever-you-named-your-child-theme’.
Save this as “functions.php” in the same folder as your style.css.
Upload this folder to your site’s “themes” folder (wp-content > themes) and now you have a Child Theme installed.
This is it.