Child Themes

What are Child Themes?

Last modified: February 23, 2020

Cloudways

When you’re making code changes to your WordPress website’s theme, you don’t really want to be making changes to the actual theme. This can cause significant problems with your website and may even cause it to crash. The worst timing for this is when there is a major update on the theme that conflicts with your changes.

Therefore, developers use Child themes. This is a sub-theme that has all the functionality, features and style of the ‘parent theme’ but has the modifications needed to make the website as the developer wants it. It is a safe way to customize a website for perfection.

This system allows for the parent theme to get necessary updates without the changes to the theme that you and a developer have made being lost.

Child themes are highly valued in WordPress development because they are a safe alternative to theme creation which is expensive. Also customized themes can sometimes be glitchy and not compatible with numerous, and often popular, plugins.

To create a child theme for your WordPress website, you must first create a folder in the theme directory on your WordPress website. This can be done using FTP systems like Filezilla. The child theme folder only needs a style.css. In this file, in the header section, you need to specify which theme is the parent theme. This is done by adding a template line into the code where the theme name is written.

As the child theme style sheet is added after the parent theme’s style sheet, it will override any styles that are different. However, for any of the modifications you’ve made to be made live on your website, you will need to activate the child theme through your WordPress dashboard.

Once activated, the child theme will override any necessary alterations you’ve specified. Any functionality or style you’ve not changed will result in the default of the parent theme. Many themes have specific child themes you can customize already. And some can include multiple child themes to help you make the most out of your WordPress website.

Show More

* This button will show the rest of the post and open up an offer from a vendor
Save 4 Later
Email liked links to yourself

    Related glossary Items