WordPress child themes: What are they and do you need one?

Web Hosting

Have you ever edited your theme files only to have those changes lost when your theme was updated? If so, you need a child theme.

A child theme is a way of modifying your current WordPress theme without editing the current theme (parent theme). The current theme you have installed doesn’t become a parent theme until you add a child theme. The child theme inherits functionality from the parent theme.

You can think of it as an add-on theme with customizations. The parent theme is still the main theme in use but the child theme changes some things with the parent theme in a more organized way than just directly editing the parent theme. They both work together to form the layout and design of your site.

Why do you need a child theme?

You should use a child theme if you are making any changes to your WordPress theme in terms of code.

Although it isn’t necessary if you are just changing CSS. Since WordPress 4.7, you can use the Additional CSS section within Appearance > Customize > Additional CSS to change CSS on your site without needing a child theme.

When editing a function within the functions.php file, adding a page or post template (to change the layout of posts or pages) a child theme should be used. It will allow changes to be made to the theme without them being lost if the theme is updated.

If you don’t ever plan to update your theme, there is no need to use a child theme. But almost every theme is going to have updates to improve security or functionality. You don’t want to miss out on those because you made changes that you are afraid of losing.

Unless those changes are well documented its going be hard to remember exactly what what needs to be done to get your theme back to the way it was.

How does a child theme work?

As mentioned earlier the child theme inherits functionality from the parent theme. This means that you don’t need to recreate everything from the parent to use in the child theme.

Keep in mind, the child theme won’t work without the parent theme. The parent maintains all the functionality and the child supplements it with additional features or modifications.

Child themes can be difficult

Building a child theme from scratch is fairly difficult for most new WordPress users. They require programming knowledge and a good understanding of how WordPress and your parent theme work.

That’s not to say a beginner shouldn’t jump right in and start making changes with a child theme. But depending on the changes to be made, it can get more complicated than new users are comfortable with.

How do you create a child theme?

Use a plugin

Plugins like Child Theme Configurator or Childify Me allow you to create a child theme without coding one or downloading one and installing it.

There are also many more in the WordPress plugin directory. Some have more functionality than others so you may want to experiment to see what suits your needs before settling on one.

Download one

I’m currently using the Colormag theme by ThemeGrill on two news sites. It’s a great magazine style theme with a free or premium version. ThemeGrill actually has a page where you can download child themes for their themes.

Download the child theme for whatever ThemeGrill theme you have and make the changes you need.

Check with the developer of your theme to determine if they offer a child theme. If they don’t currently offer one, they may be willing to build one for a fee.

Manually create one

If you have a understanding of how WordPress and our theme work together and don’t some programming, build your own child theme.

Final thought

The information mentioned above gives a high level overview of how child themes work. Building one from scratch requires more in depth knowledge to understand how they are implemented and their limitations.

The WordPress Codex has great documentation on child themes that explains how to create them along with very detailed information about how they work.

If you build a child theme from scratch or just want to dive deeper into how they work, its the ultimate resource.

I build and maintain multiple WordPress websites. By using the experience gained from building these sites I help others create and customize their own websites.
Posts created 27

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top