Book a call Free rebuild
Home/Glossary/WordPress/Child Theme

Child Theme

May 19, 2025 Updated November 16, 2026 3 min read

WordPress glossaryA child theme is a WordPress theme that inherits its design and functions from a parent theme, so changes made in it survive when the parent updates.

A child theme is a small theme that sits on top of another one. It borrows everything from its parent theme (templates, styles, and functions) and holds only the changes you make. WordPress loads the parent, then applies the child's overrides, so the site looks like the parent with your customizations layered on.

The point is updates. Edit a theme's own files and the next update overwrites them, taking your work with it. Put the same edits in a child theme and the parent can update freely, because nothing of yours lives in its folder.

How it works

A child theme needs only one file: a style.css with a header whose Template line names the parent theme's folder. With that in place, WordPress treats the two as a pair.

  • Templates: when WordPress needs a template such as single.php, it looks in the child theme first and falls back to the parent. Copy a file into the child and edit it there to override it.
  • functions.php: the child's functions.php does not replace the parent's. Both run, and the child's loads first.
  • Styles: the child's stylesheet loads after the parent's, so its rules win where they conflict.
  • Paths: get_stylesheet_directory() points to the child theme and get_template_directory() to the parent, which matters when you load files from either.

Creating a child theme

Create a folder in wp-content/themes/, for example example-child for a parent in example-theme, and add a style.css:

/*
Theme Name: Example Child
Template: example-theme
Version: 1.0.0
*/

The Template value must match the parent's folder name exactly, including case. For a classic theme, add a functions.php that loads the stylesheets. The old @import method is slower and no longer recommended:

<?php
add_action( 'wp_enqueue_scripts', function () {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style', get_stylesheet_uri(), array( 'parent-style' ),
        wp_get_theme()->get( 'Version' ) );
} );

Some parent themes already load the child's stylesheet themselves, so check the parent's documentation before adding this. Then go to Appearance, then Themes, and activate the child. The parent must stay installed, but not active. An optional screenshot.png (1200 by 900 pixels) gives the child a preview image in that screen.

Plugins such as Child Theme Configurator can do the setup for classic themes. For block themes, the Create Block Theme plugin from the WordPress.org team can generate a child theme from the Site Editor.

Child themes and block themes

Block themes support child themes too. A child can include its own theme.json, which is merged with the parent's, and its own templates and template parts in /templates and /parts, which replace the parent's versions.

Many block theme sites never need one, though. Changes made in the Site Editor, such as edited templates and global styles, are saved in the database rather than in the theme's files, so a theme update does not wipe them. A child theme earns its place when the changes are code you want in version control or reused across sites.

When to use one, and when not to

A child theme makes sense when you need to override template files, add PHP to the theme, or ship a set of customizations to several sites. It is overkill for a few color or font tweaks: the Customizer's Additional CSS panel, the Site Editor's styles, or the theme's own settings handle those. Features that should survive a theme change, such as custom post types or shortcodes, belong in a plugin, not in any theme.

Common mistakes

  • Wrong Template value. If it does not match the parent's folder name, WordPress reports the theme as broken.
  • Stale template overrides. A template copied into the child stays frozen. When the parent fixes a bug in that file, the child keeps the old version, so review overrides after major parent updates.
  • Styles loading twice, or not at all. Check what the parent already enqueues before adding your own calls.
  • Expecting a grandchild. WordPress supports one level only: a child theme cannot be the parent of another child theme.
  • Cached CSS. Bump the child's Version or clear caches when changes do not appear.

Source: WordPress Theme Handbook, Child Themes.

WP Services

WordPress services at revolutionary pricing.

Productized WordPress services, from builds to care, delivered by Seahawk and tracked in one app. For the WordPress lovers.