[et_pb_breadcrumbs _builder_version="3.0.66"][et_pb_breadcrumb title="Home" link="/" /][et_pb_breadcrumb title="Learn" link="//optimusdivi.com/learn/" /][/et_pb_breadcrumbs]

Child Theme Basics

What is a Child Theme?

A Child Theme is an active Theme in WordPress Appearance>Themes that has a line of code to tell WordPress to also use the specified parent Theme (installed but not activated) in WordPress Appearance>Themes. It is the method of making customizations to your Theme but still being able to accept updates from your original Theme developer.

Why is a Child Theme important?

WordPress has this brilliant update method, but it is also dangerous. When you update a Theme, the entire existing Theme is deleted and the latest version installed where to other one used to be. Any customizations made to the Theme files will be deleted with it. Note, if you put customizations into the Divi interface (like custom CSS in your Theme Options Panel) they are safe because the Theme saves them into the database. The database is not touched during the WordPress update process.

So, any change made to the Theme, even ones you did not know about, or have forgotten, are obliterated when you click update. There is no way to undo this (unless you have a good backup system in place, which is a story for another time. It is also a long and annoying process to restore something that will simply happen again next time.).

We applaud Elegant Themes and their commitment to regular Theme updates. With a Child Theme you can stay up to date with confidence. As your confidence grows you can also make customizations because you know that you have the correct file structure in place to do so.

Why is a Child Theme important for developers?

The real power of the Divi Theme is the human friendly graphical interface. But unless you make some customizations, every website you build will start to look very similar to the rest of your portfolio. To achieve some of your design specifications, you’ll need to edit the Child Theme. Particularly for navigation or footer changes. These will go into the footer.php file for example. And the Parent Theme will have its footer.php file replaced every update. So if you are going to add to it, then it MUST be in the Child Theme’s footer.php.

Why is a Child Theme important for designers?

It is likely that any developers reading this already know and use Child Themes. Custom CSS, and all other theme tweaks, are essential to be in a Child Theme rather than altering the Parent Theme itself. There is of course the Custom CSS section in the Divi Theme Options. But once you reach even semi-serious Theme alterations, these changes are easier to manage in the actual CSS files. Developers will be more at home with their syntax highlighting and search and edit functions in a CSS file rather than a text box.

Why is a Child Theme important for business owners?

For those building a Divi Theme website for their own business (or as an employee), but are not web professionals, I still ALWAYS recommend a Child Theme. I know it seems unnecessary (“I don’t know code, I can’t see myself doing any customizations…”) but customizations can sneak in even without you realizing. If you are Googling to try to find a tutorial on something, chances are it will tell you to edit the Theme, and you will follow along, and unwittingly set yourself up to break your site next time you update.

Even if you haven’t yet, there are so many cool things you can do, if you are active in your website at all then across 12 months I’d say it is likely you’ll want to change an element. Setting up the Child Theme in advance makes it less likely you will make a mistake as well as that it removes obstacles later when you are trying to customize something. That is why we have written this guide with the aim to simplify it to less than 15 minutes. If you use our pre-built downloadable Child Theme for Divi then you can probably do it in under 7 minutes!

I cannot count how many support requests I have seen on public groups where people have lost custom work and the answer to it all is, “you should have had a Child Theme. It is too late now, it has been deleted.” Please, even if you don’t think you’ll ever use it, create and activate a Child Theme.