- Article
- Intermediate
- 3 minutes read
- Reviewed August 3, 2026
A child theme extends an existing parent theme.
It allows a project to add or override theme files without modifying the parent package directly. The parent can then receive updates while project-specific customizations remain in the child theme.
Parent and Child Responsibilities
The parent theme provides the main design system, templates and functionality.
The child theme can add:
- Styles.
- Template overrides.
- Template parts.
- Functions and hooks.
- Assets.
- Patterns.
- Block-theme files and configuration.
WordPress loads the two themes together according to specific rules. A child does not copy every parent file; it inherits what it does not replace.
Why Direct Parent Edits Are Unsafe
A vendor update replaces parent-theme files.
Any manual edit inside those files can be lost. Direct modifications also make it difficult to distinguish vendor code from project code, review changes and apply security updates.
A child theme or custom project theme creates a clearer ownership boundary.
Basic Child Theme Structure
A child theme requires its own directory and a style.css header that identifies the parent theme through the Template value.
It can also include functions.php and any files needed for overrides.
Classic and block child themes differ in the files they commonly use, but the inheritance principle is similar.
Template Overrides
In classic themes, a matching template file in the child theme can override the parent version.
In block themes, child templates, parts and theme.json can extend or replace parent behavior. User customizations stored through the Site Editor may still take precedence over both file sets.
Copy only the files you intend to maintain. Duplicating the entire parent theme creates unnecessary divergence.
functions.php Behavior
The child theme's functions.php does not simply replace the parent's file. Both can load.
This means functions must use unique names and hooks carefully. Attempting to redeclare a parent function can produce fatal errors unless the parent explicitly makes it replaceable.
Use hooks and documented extension points whenever possible.
When to Use a Child Theme
A child theme is useful when:
- A maintained parent theme provides most of the required system.
- The project needs template or style overrides.
- Customizations must survive parent updates.
- The team can monitor upstream changes.
It may not be the best choice when:
- Nearly every parent template will be replaced.
- The parent has heavy unwanted dependencies.
- The project needs a fully independent design system.
- Permanent business functionality is being added.
In those cases, a custom theme or plugin may be clearer.
Maintaining a Child Theme
Parent updates can change markup, hooks or assumptions used by child overrides.
After an update:
- Review the parent changelog.
- Compare overridden files.
- Test templates and responsive behavior.
- Check deprecated functions.
- Confirm WooCommerce or plugin template compatibility.
- Remove overrides no longer needed.
A child theme prevents overwriting; it does not eliminate maintenance.
Frequently Asked Questions
Does a child theme slow down WordPress?
Not inherently. Performance depends on implementation and assets, not simply on the parent-child relationship.
Can I put custom post types in a child theme?
Technically yes, but durable content functionality normally belongs in a plugin so it remains after a theme switch.
Can a block theme have a child theme?
Yes. Block themes support child-theme approaches, including templates, parts and theme.json customization.
Continue Learning
Previous: Creating and Editing Custom Templates