Home/web design/What is a child theme?
  • using a child theme

What is a child theme?

Why use a child theme?

WordPress themes are little gems, honed and amended over many iterations and able to produce a vast range of amazing websites . BUT , and we are all guilty of this, it’s never quite enough straight out of the box. There’s always a colour you’d like to change, a font to resize, a widget to align differently and so on. How do you do that? It might seem obvious… edit the theme code until it’s just how you want it. Great, everything looks the bee’s knees, and you are rightly proud of your tweaking skills.

Time passes and a theme update arrives, perhaps it even auto instals itself? The wonders of technology you may say. That is until you look at your pride and joy website only to find a changeling ! Where are all those improvements, why has everything regressed? Simple, all of your updates have been overwritten by the new theme code. So what did you do wrong?

So what did you do wrong? You didn’t create and use a child theme.

A child theme is created in order to avoid that disastrous loss of edits. Modifying a theme in any way means you cannot ever update the theme to a newer version because if you do you will lose all your changes. A child theme allows you to use all of the functionality of your main (Parent) theme while freeing you to update without the fear of losing your modifications.

So what is a Child Theme?

A child theme is a separate theme that refers to the parent theme for most of its functions. WordPress always checks first for a child theme. It looks for functions and styles and if it doesn’t find what it needs then it looks at the parent theme.

Child themes should always be used if you want to customise your site in any way and that’s for two very good reasons: allowing updates and better organisation.

Theme Updates

If you edit a theme without using a child theme you have two options: either never update your theme again, or go ahead and update it but be prepared to lose all your edits. Now that is plain silly after all the time and effort you put into your mods! Yes, of course you can copy and paste all those alterations, but why would you want to? Anyway, that is asking for trouble, we all make mistakes, copy wrongly, drop code in the wrong place etc and any one of those errors can crash a website.

Not updating your theme is also a big “no no” in terms of security. Outdated software is a hacker’s playground, full of exploitables and chances to wreak havoc. Not updating your theme is asking to be hacked! If you check the records and statistics of hacked websites you’ll find that in most cases, the culprit was old plugins, archaic WordPress versions and ageing themes.

Organization

When you alter a theme you are changing individual lines of code amongst thousands. If ever you come to trace those changes, or simply recall what it was you did, you will struggle. Worse still, any future developer will have an even harder time. You are making life for the future of your site extremely difficult. You are also lining yourself up for needlessly expensive work in future, paying a coder to sort out the chaos you have created.
Creating a child theme is very easy, so why not use one? It is simple and makes supreme sense. So always use a child theme or insist that your developers does.

Need help with theme updates and child themes? Call Paul on 07788 931 511

Leave A Comment

answer * Time limit is exhausted. Please reload the CAPTCHA.