WordPress explained

Child Theme

  • 1 min read
  • Term 18 of 143
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

A child theme is a WordPress theme that inherits all the styling and functionality of a parent theme, but lets you make custom changes safely. Think of it as a layer on top of your main theme: your edits live in the child theme, so when the parent theme updates, your customizations don’t get wiped out.

Why You Need a Child Theme

Without a child theme, any custom CSS or code you add directly to a theme gets erased the moment that theme updates. A child theme keeps your changes safe.

What a Child Theme Contains

  • A style.css file that declares it’s a child of the parent theme
  • A functions.php file for adding custom PHP code
  • Any template files you want to override

How to Create One

You can create a child theme manually (create a folder, add a style.css with the right header), or use a plugin like Child Theme Configurator to generate one automatically.

When to Use a Child Theme

  • When you want to customize a premium theme (like Astra (opens in a new tab), GeneratePress, or OceanWP)
  • When you need to edit template files
  • Any time you’re making code-level changes to a theme

If you’re using a page builder like Elementor (opens in a new tab) for all your design, you may not need a child theme, but it’s still good practice.

Related: WordPress Theme

Ferdy.com

Still stuck?
Watch along

Most questions are easier when you see them on screen. Find the tutorial for your problem and follow along.