Child Themes vs Parent Themes in WordPress
Updated 23 Oct 2026 路 by the DetectWP team
Run a theme detector on an agency-built WordPress site and you will often get two answers: something like astra-child and astra. That is not a mistake. The site is running a child theme, a thin layer that inherits everything from a parent theme and overrides only what the developer changed. Child themes are one of the oldest and most useful conventions in WordPress, and understanding them clears up a lot of confusion about what a site is "really" built with. This guide explains how the relationship works, how to tell which theme is active, and when you should use a child theme on your own site.
What a child theme is
A child theme is a WordPress theme that declares another theme as its parent. At minimum it consists of a folder under /wp-content/themes/ containing a style.css file whose header includes a Template: line. That line holds the folder name of the parent theme. A complete, functional child theme can be as small as this header: Theme Name: Astra Child, Template: astra, plus the usual Author and Version fields.
When the child theme is activated, WordPress loads the parent theme's templates, functions, assets and settings as though the parent were active, then applies anything the child provides on top. The child can add a functions.php to register extra behaviour, drop in template files that replace the parent's versions, include its own stylesheet, and in block themes supply a theme.json whose settings merge with the parent's. Whatever the child does not define, the parent supplies.
The purpose is update safety. If you edit a parent theme's files directly, the next update of that theme overwrites your changes. Changes made in a child theme live in a separate folder that updates never touch. The WordPress theme handbook has the canonical description.
What the Template: header means
Template: is the single field that turns an ordinary theme into a child theme. Its value must exactly match the directory name of the parent, not its display name: Template: astra works, Template: Astra Theme does not. If the named parent is not installed, WordPress refuses to activate the child and shows an error on the Themes screen explaining that the parent theme is missing.
Internally, WordPress keeps two options: template, the parent's directory, and stylesheet, the active theme's directory. For a normal theme both values are the same. For a child theme, stylesheet is the child and template is the parent. This is why theme functions come in pairs: get_template_directory() returns the parent's path, while get_stylesheet_directory() returns the child's. Plugins and themes that use the wrong one are a common source of bugs when a child theme is introduced.
The Template: field also governs the template hierarchy. When WordPress needs, say, single.php, it looks in the child theme's folder first and falls back to the parent only if the child does not have the file. A child theme's functions.php is loaded before the parent's, so the child can define functions the parent checks for with function_exists(), which is how well-designed parents allow their defaults to be overridden.
Why detectors show both themes
A detector reads the public HTML, and a site running a child theme references both folders. The child's own stylesheet, if it has one, is loaded from /wp-content/themes/astra-child/style.css. The parent's compiled CSS, JavaScript, fonts and images are loaded from /wp-content/themes/astra/..., because the child does not duplicate them. Both paths are real and both themes are in use, so an honest detector reports both and labels which is which.
DetectWP does this by reading the Template: field from the child's style.css when it is accessible, and otherwise by inferring the relationship from the two folders appearing together. The child is reported as the active theme and the parent as the framework it is built on. For most purposes, the parent is the more informative answer: it tells you the design system, the feature set, the likely page-builder compatibility and the vendor whose changelog you should follow. The child tells you that the site has custom code and roughly how the developer organised it.
Occasionally a child theme is the whole design. Agencies sometimes build a complete bespoke theme as a child of a minimal parent, or ship a child of a commercial theme that replaces most of its templates. The only way to judge is to look at how much the child's stylesheet and markup diverge from the parent's defaults. The DetectWP theme detector reports the sizes and versions it can see, and our manual theme-finding guide shows how to inspect the files yourself.
How to tell which theme is active
From inside the WordPress admin it is unambiguous: Appearance, Themes shows the active theme with an Active label, and a child theme's details panel names its parent with the phrase "This is a child theme of ...". The Site Health Info screen under Tools lists both the active theme and the parent theme with their versions.
From outside, use these checks:
- View the page source and collect every
/wp-content/themes/<folder>/path. One folder means a normal theme. Two usually means a child plus parent. - Open
/wp-content/themes/<folder>/style.cssfor each folder. The one whose header containsTemplate:is the child and is the active theme. The folder it names is the parent. - If neither stylesheet is readable, the folder whose name includes
childis the obvious candidate, but do not rely on naming. The folder that provides the bulk of the CSS and JavaScript is almost always the parent.
If you would rather not read stylesheets by hand, paste the URL into the DetectWP scanner, which labels the child and parent separately and shows the version of each.
A detail that trips people up: a child theme is only active if it is the one selected on the Themes screen. Having a child theme installed does nothing by itself, and a site can have a child theme folder on disk while running the parent directly. The public HTML will not reference an inactive child, so if you only see the parent's paths, the parent is active.
When to use a child theme
Use a child theme whenever you need to change a theme's PHP templates or functions and you expect the theme to receive updates. That covers most classic themes: adding a custom template part, changing how a post's meta line is rendered, registering a sidebar, or adding a hook that the Customizer does not expose. A child theme is the correct, update-safe place for all of that.
You often do not need one for smaller changes. The Customizer's Additional CSS panel (for classic themes) and the Site Editor's Styles panel (for block themes) store customisations in the database, where updates cannot overwrite them. A code snippets plugin can hold small PHP functions. And block themes change the picture further: with the Site Editor, template and style changes are saved to the database rather than to files, so a block theme can be customised extensively without any child theme at all. A child of a block theme is still useful when you want to ship templates, patterns and theme.json changes as version-controlled code, or distribute the same customisations across several sites.
Practical advice for creating one: most popular theme vendors, including Astra, GeneratePress and Kadence, provide a ready-made child theme download or generator, and the Create Block Theme plugin from wordpress.org can generate a child of any block theme from inside the admin. Whichever route you take, enqueue the parent stylesheet properly with wp_enqueue_style() in the child's functions.php rather than using an @import in style.css, which is slower and has been discouraged for years. Then activate the child, confirm the site looks identical to before, and make your changes there.
Common pitfalls
- Forgetting the child exists. Months later, someone switches to the parent to "test something" and the custom code vanishes. Document that the site runs a child theme.
- Copying the whole parent into the child. This defeats the purpose; copy only the files you change, so parent updates still reach everything else.
- Using the wrong path function.
get_template_directory_uri()points at the parent. If you want a file from the child, useget_stylesheet_directory_uri(). - Leaving the child's version at 1.0 forever. Bump it when you change the child's CSS so that browsers and CDNs fetch the new file.
- Nesting children. WordPress does not support a child of a child. If you need to build on a child theme, build on its parent and copy the child's changes.
Get those right and a child theme is almost invisible in day-to-day use: the site updates normally, your customisations stay put, and anyone inspecting the site, including DetectWP, sees a clear picture of a well-maintained parent with a tidy layer of custom code on top.
Frequently asked questions
Which theme is active when a site has a child theme?
The child theme is the active theme. The parent is loaded automatically underneath it and provides everything the child does not override.
What does Template: in style.css mean?
It names the directory of the parent theme. Its presence is what makes a theme a child theme, and the value must match the parent's folder name exactly.
Why does a theme detector show two themes?
Because the site's HTML loads files from both the child's folder and the parent's folder. Detectors report the child as the active theme and the parent as the framework it is built on.
Do I need a child theme for a block theme?
Usually not for day-to-day customisation, because the Site Editor saves template and style changes to the database. A child theme is still useful when you want to distribute customisations as code or keep them under version control.
Can a child theme have its own child theme?
No. WordPress supports only one level of inheritance. A child's Template: must point to a theme that is not itself a child.
Related
Free tools: WordPress plugin detector 路 WordPress theme detector 路 WordPress hosting detector