One of the best lessons learnt when working in the WordPress space is that the use of child themes can really save your bacon. Particularly as you start building complex and highly customised websites.
I make a habit of installing child themes as part of my initial site build checklist, even if I don’t have plans to make use of the additional functionality straight away.
What is a child theme and why use one?
A child theme is a theme that links to a parent, in this case the Elementor Hello Theme. It’s made up of one or two control files, and provides a local repository for your theme additions or code changes.
Installing the Parent Hello Theme
Installing the Child Hello Theme
To install the Child Hello theme you’ll need to download the zip file from the Github repository. (Note the child theme is only made up of four files).
Once you have a copy of the theme, manually upload the theme to your WordPress instance. In the WordPress dashboard browse to Appearance – Themes and click the Upload Theme button.
Browse for the previously downloaded zip file and click Install Now.
You’ll notice the installation checks for the presence of the parent theme.
How to use your new Child theme
So now we have two themes installed – the parent Hello theme, and the active Child Hello theme. At this point you’re good to start adding your own customisations.
To use these files you can use one of two methods.
- Using the WordPress dashboard. Browse to Appearance – Theme Editor and make sure Hello Elementor Child is selected from the dropdown list. Here you can add your custom code to the file of your choice.
- Using the file browser from your site’s hosting cPanel/management environment.
I use Siteground hosting for all my client sites (they are brilliant!) and will demonstrate using their environment.
From the cPanel dashboard, select the File Manager
Once the file manager has opened you can then edit the file as needed.
If you need to make changes to a file not listed in the child theme – say for instance the footer.php file – you can simply copy the file from the parent folder into the child folder and make your changes.
Any files copied in this way will then be protected from being overwritten during future upgrades.
The other reason is that I’ve built a library of functions and CSS styling over time. It’s very easy to upload one or two files into the child theme repository and have access to all that I’ve previously written.
Anyway, that’s it for this tip. Hope it helps.