A child theme is a section within your WordPress website where you can make changes to your current theme. You can also make changes using the main theme but those changes would be overwritten when you update the theme. With a child theme, the changes will be present even after an update. With a child theme, you can add functions, custom CSS, style, templates and other things that will enhance your website. In this post, I will show you step-by-step how to create and customize a WordPress child theme.
Download the Child Theme plugin
At your dashboard, go over to Plugin>>Add New, then search “Child theme configurator“, install and activate. Then go over to Tools>>Child Themes. It takes you to the configuration set-up menu. There are a list of steps to take and I’ll break it down bit by bit.
- Select an action: click “Create a new Child theme”
- Select a parent theme: Select the theme you are going to use to create a new child theme, For this tutorial, I’m going to be using the Astra theme
- Analyze parent theme: Once it gives the message that it is OK to use as a child theme, go ahead with the next steps
- Name Theme directly: Default theme directly is okay
- Option 5&6: These options are default, keep it as it is
- Customize child theme name, theme website, author, author website, theme description, theme tags(you can leave this or delete them) and version
- Click “Create new child theme“
You then go over to Appearance>>Themes. You will see the parent theme already activated and the child theme waiting to be activated. Activate the child theme.
How to Customize a WordPress Child Theme
Go over to Appearance>>Theme Editor. It takes you to a page where there are a list of theme files and some bit of codes. These are the file for the child theme so if you want to customize say the header of your website, you go over to Tools>>Child Theme>>Files.
Here, you see the files in the parent theme, you click on any of these files and make a copy of it in the child theme. That way, you can go in and customize things you want to customize. In this tutorial, we want to customize the header so click the header.php file and click “Copy selected to child themes“
Next, you go over to Appearance>>Theme Editor and there, you can see the theme header file is now present. To customize, click on the header file and from there, you can make changes and customizations to the theme without the risk of being overwritten should an update be carried out.
Hope you enjoyed the tutorial, If you still have problems and questions, feel free to reach me here.
PROMO🎈✨: I will design a WordPress website for the first 100 people and I’ll do it for free. Contact me if interested.