Web Development

How to edit WordPress theme by creating a child 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
  • style.css
  • functions.php

If your child theme shows error: “The parent theme is missing. Please install your parent theme”. There are three things to check:

1 – Is your parent theme complete and what is the exact spelling of the parent theme’s name in its style.css. Uppercase and lowercase are important.

2 – Is the child theme directory named parentname-child. It should be in the themes directory, not in a subdirectory of the parent theme.

3 – Does the child theme’s style.css have the line Template: parentname in its header. Beware: NOT Template: parentname-child.

More information: https://codex.wordpress.org/Child_Themes