Skip to content
hostcomplex

What Is a Child Theme?

Maarten Soetens 3 min read

What a child theme is

A child theme is a WordPress theme that inherits the design and features of another theme, called the parent theme, and holds only the changes you want to make. Because those changes sit in a separate theme, updates to the parent do not overwrite them.

Think of the parent as the base product and the child as your own layer on top. The parent does most of the work, while the child contains customizations such as altered template files, extra styles or small pieces of code that adjust how the parent behaves. For the design layer itself, see what a WordPress theme does.

How parent and child themes load together

When a child theme is active, WordPress looks for each template and style file in the child theme first. If a file is missing there, it uses the version in the parent theme. Only the files you need to change have to exist in the child, which keeps it small.

The child theme identifies its parent through a line in its main stylesheet, for example Template: parent-theme, where the value is the parent's folder name. The child's functions file runs alongside the parent's rather than replacing it, so both sets of code are loaded. The folder layout is covered in WordPress file and folder structure.

When a child theme makes sense and when it does not

A child theme is most useful when you need to change template files or add theme-specific code, and you want those changes to survive updates. It also keeps custom work separate from the original theme, which makes it easier to see what has been changed.

It is not needed for every adjustment. Many changes can be made through the Customizer, the site editor or a plugin. Functional features, such as a custom post type or a shortcode, belong in a plugin, because they should keep working if you change themes later. A child theme that copies large parts of the parent can also become outdated, so keep changes small. For the background on why updates matter, see why CMS updates matter.

Frequently asked questions

Do I need a child theme to customize WordPress?

No. Many changes can be made in the site editor, the Customizer or with a plugin, and these options are safer for simple tweaks. A child theme is the right tool when you need to edit template files or theme code and keep those edits through future updates.

Do child themes update when the parent theme changes?

The child theme does not receive new code from the parent. The parent is updated separately, and any files you have copied into the child stay as they are. Parent files that the child does not override are updated along with the parent. After a major parent update, review your copied files to confirm they still work.

Can I use a child theme with a block theme?

Yes, block themes can have child themes too, inheriting templates and settings from the parent. Many customizations are now made through the site editor and theme settings, so a child theme is needed less often. Use one when you need to add or override files that the parent theme does not expose for editing.

  • Two-Factor Authentication

    Two factor authentication hosting adds a second check to control panel, domain and CMS logins. Learn which methods are strongest and why 2FA helps.

  • What Is an A Record?

    What is an A record? Learn how this DNS record maps a hostname to an IPv4 address, why domains use several A records and the root and www pattern.

  • Billing and Automation Platforms

    What is WHMCS? Learn how this commercial billing and automation platform helps hosts sell plans, collect payments and create accounts automatically.