A child theme adds or overrides selected parts of a parent theme. It keeps your file changes separate so a parent update does not overwrite those files. It does not guarantee compatibility with every future parent update.
Decide whether you need a child theme
You usually do not need one to write posts, insert patterns or change settings through the Site Editor. Those are content or saved editor choices. A child theme becomes useful when you need portable file-based template, style or PHP changes while retaining a parent theme.
If your change is site functionality that should survive any theme switch, consider an appropriate plugin instead. For example, a business data type should not disappear just because you choose another design.
Before writing files, define the change and check whether the theme already provides a supported control. A small color change is rarely a reason to begin maintaining PHP.
How inheritance works
WordPress loads the parent theme's design with the child's permitted overrides. A child template file can replace the corresponding parent template. Both parent and child functions.php files load; the child's functions.php does not replace the parent's.
Do not copy a whole parent functions.php into the child. Duplicate function declarations can cause fatal errors. Add only the code required for the change, following the parent theme's documentation.
With a block theme, saved user customizations can take precedence over theme files. If an edited template is stored in the database, changing the child's template file may not appear until the saved customization is addressed. Back up the saved version before resetting it.
The minimum declaration
A child theme needs a style.css header naming its parent folder. For a Twenty Twenty-Four child, a minimal header is:
/*
Theme Name: RoarWP Practice Child
Template: twentytwentyfour
Version: 1.0.0
License: GNU General Public License v2 or later
*/The Template value must exactly match the parent's folder name. This example declares a child; it does not load arbitrary CSS or create a finished theme. Whether style.css needs to be enqueued depends on the parent theme. Do not paste a universal enqueue snippet without checking what that parent already loads.
Build and verify on staging
Create the child on a test site with the required parent installed. Activate it, then make one small change and verify the affected view. Keep your files in version control or retain dated copies so you can undo them.
For block-theme colors and typography, theme.json can be the appropriate file. For structural changes, use the relevant template or part. Keep changes narrow; copying every parent file prevents you from benefiting from later fixes to those copies.
Test a parent update on staging before applying it publicly. Recheck the views your child overrides and any functionality it adds. If your customization becomes extensive, maintaining a separate theme may be clearer than overriding most of the parent.
Sources & verification
Sources checked October 7, 2026. Documented behavior is distinct from hands-on testing.