fbpx

A recent WordPress survey said that 85% of web page designers (yes us) customize their WordPress themes, but only 35% use a child theme when doing so (yes a bit mad, I know).

How to easily and quickly create a Child Theme in Word Press and Why you need a Child Theme. #wordpress, #websitebuilding, #childtheme. Click To Tweet

Why?

Possibly this is because of a lack of understanding about what a Child Theme is, or due to thinking that to do it, it must be really hard (Yes that was me!!).

But it isn’t so hard nowadays. (ed: “heh Jeff who’s been talking?”)

In this short tutorial, I’m going to show you how to easily get a child theme on your website and explain a bit about why you want and need a Child Theme.

But what are we all doing here Jeff?

What’s this all about?

A child theme is something I’ve been aware of for about a year, I knew I needed to do one, but I did nothing about because;

 

  • I didn’t have the time,

  • it looked too confusing,

  • it was too much hassle, right?

 

Well no not quite…read on.

Why do you need a child theme?

Well to start…

 

Any new code or adjustments that you make to your parent theme, i.e. the main theme on your website, for example, the ‘Divi theme’, when the theme gets upgraded to the newer version, the existing code or adjustments that you may have made, that are outside of the theme update gets undone, deleted.

 

In short, they stop working.

This can be really frustrating where you have a few upgrades going on.

Read on for more explanation about this.

 

Putting your upgrades into the child theme, instead of the parent theme, makes it safe when the parent theme is updated.

 

The code customizations are updated automatically from the child theme into the parent theme.

If you aren’t getting this, I’ll explain some more.

 

For example; I want my blog articles to say… the last time I updated my article, not when it was originally published.

 

Because I update my articles regularly, I keep them dewy fresh and spanking new.

 

I like my articles to be evergreen and not to go all old and mouldy.

 

So I put a great bit of code into the theme area called; functions.php
and this allows me to show when I last updated the article.

As shown here:

However, if I don’t have a child theme then when I update the Divi theme

which is like every other day, the code gets wiped out.

Like here:

I then need to go back in and redo it all again.

It is a right old pain in the neck.

And a waste of my time.

So we create a child theme to make it all much better. As I explained above.

When the Divi theme in the parent part of the theme gets uploaded, the child reminds the parent that we also have extra code and features that are then put back in automatically and I don’t need to any more.

Now making a child theme was a bit confusing for me at first.

WordPress sent me a video and an article to read which left me a bit ummmm… “uh what?”

So I’ve been doing some research online recently and I’ve found another way, a much easier way, to do it and I wanted to share that with you here.

We can do it via a plugin, and this plugin can be deleted after we have used it if you want to.

I’ve used a plugin called:

It is free to download and use, and seems to be updated frequently and has 100’s of thousands of users, so seems pretty good.

How to get this up and running:

Firstly…Go into plugins on your WordPress site.

In the keyword area type in the child theme, this then brings up a variety of plug-ins for a child theme.

I chose the ‘child theme configurator‘.

 

Click on ‘installer’ and then ‘activate’ it.

Activate the plugin and then look in the Tool Menu of your WordPress back office:

Select ‘Child Themes’.

Step one: select an action – we’re going to select ‘create a new child theme’

Step two and three: select a parent theme. I chose the theme that I was using at the present time.

The active theme you are using for your site.

Then you click on ‘analyse’.

Step four: give your theme for the child a folder name.

For example, this is usually the theme name followed by a ‘-‘ and the word ‘child’.

Step five: select where to save the new styles. We chose the primary style sheet.

Step six: keep the default options here. Select ‘use the word press style queue’.

Step seven: as you can see in this section you can change the name of the author name etc. however the plug-in has done everything for you, so I recommend leaving it as it is.

Step eight: copy menus area.

 

All we do here is check on the little box where it says NOTE.

This one option really helps us a lot; it means that everything from the parent theme is copied straight into the child theme for us.

This helps us esp. where we are making a child theme some way into developing our website.

Step nine: click on ‘create new child theme’. It is quicker than blinking.

A notice should come up saying this:

Then if you go to appearance on the left-hand side of your WordPress options, you can see themes.

Click on themes and there you can see the child version of your theme sitting in a themes area. On the child theme click on ‘activate’.

Easy Peasey.

Or here…  

So now if we need to update our theme, and put in some new code, for example, we do it in the child theme, rather than the parent theme going forward.

You can find the themes under Appearance on the left side of your WordPress index, and you have ‘themes editor’ at the bottom under ‘appearance’.

To go into the child themes editor; You go into tools and then you can see child themes at the bottom of the tools index on the left side of your WordPress.

And then you can go into files at the top of those different files and you can see underneath all the different files you can click on, where you might wish to place customized code.

Click on the one you want and then select: ‘copy selected to child theme’.

To then see this you can go back into appearance and select theme editor, and you can see the child option within that area.

As I mentioned before the function.php file area is not done via this section but if you click on the section here, you can then go into the child theme function.php, and select what you want to do from there. For example here:

Conclusion:

Then add the code you want to as I describe above, the code to enable me to have last time article updated rather than the date it was first published.  

You might be reading this thinking ” I’m never going to do this, I’m never going to change and customize my website”. Yes, I thought the same.

But sometimes you do. Having a child theme really, really, helps.

Believe me, it does.

I hope this has been useful and please share with your friends who are also developing their own websites.

If you want to read more of my musings and articles have a look here on my blog on the Axe your 9 to 5 website.

Or if you want to see what education I am getting that is changing my life around and getting out of the 9 to 5 by building my own online business, there are 7 free videos that will blow your mind.

They will show you that there are alternatives out there that any person can achieve if they want to. Act here for the videos.

 

Heh readers… have you got any useful tips or hints that you’d like to share below about themes or life in general? Let us have your feedback below.

Leave a comment below and let me know.

I’d love to hear your thoughts.

Take back control.

Jeff James.

axe 9 to 5 logo jeff james

axe 9 to 5 logo Jeff James

**disclaimer, I am no ‘expert’ I am just a bloke who has learnt how to do some of this difficult stuff over time. You are responsible for your own learning and moving forward, having your own successes and bumps in the road. If in doubt ask the advice of your web host or theme designers.

Subscribe To My Newsletter & Free Education

Subscribe To My Newsletter & Free Education

Join my mailing list to receive the latest news and updates from Jeff James

You have Successfully Subscribed!