1. Home
  2. Docs
  3. Dokly
  4. General
  5. Child Theme

Child Theme

A child theme in WordPress is a theme that inherits the functionality, features, and styling of another theme, called the parent theme, while allowing you to modify or add to it without affecting the parent theme’s code.

Key Points of a Child Theme:

  1. Inheritance from Parent Theme:
    • The child theme pulls its design and functionality from the parent theme. Any modifications you make to the child theme do not change the parent theme files. This allows you to safely update the parent theme without losing customizations.
  2. Custom Modifications:
    • You can add custom CSS, templates, or even functions in the child theme. The child theme overrides specific parts of the parent theme, letting you customize only what’s needed.
  3. Structure:
    • A child theme typically contains at least two files:
      • style.css: A stylesheet file where you define your custom styles.
      • functions.php: A file where you can enqueue styles, scripts, or add custom PHP code.

Example: Basic Child Theme Files

  1. style.css

How can we help?