WordPress Child Theme Basics Definition and requirements


A child theme is identified by WordPress when there is a directory (for example child-theme) inside /wp-content/themes/ with the following files:

  • style.css

    This file must start with a comment template like this:

     Theme Name: Example Child
     Author: Me
     Author URI: https://example.com/
     Template: example
     Text Domain: example-child-theme
     Domain Path: /languages/

    The most important things to consider here are:

    • The Template name must be exactly the folder name which holds the parent theme (aka the parent theme slug)

    • Name your child theme in such a way you can easily identify it in Dashboard (usually just append Child to the parent's name, like Example Child)

  • index.php

  • functions.php