How to create a Divi child theme
If you are going to make changes in your Divi files then it is a good practice to work with a child theme. A child theme inherits the styling & functionality of your original theme. If you don’t work with a child theme and you have made changes in the original files, then after an update those changes will be lost. In this post How to create a Divi child theme I will teach you how you can create your own child theme in 5 easy to follow steps.
What you will learn:
- Creating a child theme folder.
- Creating a style.css file with the relevant child theme info.
- Creating a functions.php file and adding the required code to en-queue the parent theme.
- A screenshot.jpg file for displaying child theme logo.
- Upload your child theme.
Step 1 create a folder
Create a folder, the name of this folder will be the name of your child theme. For example I want to create a child theme with the name arcedo. So I name my folder arcedo. (This will make sense in the next step). Don’t use spaces in your name.
Step 2 create the style.css file
Open a text editor program like TextEdit (Mac) or TextEditor (Windows) or Notepad++.
You need to place this snippet in that file.
Replace the info with your own.
Under Theme Name: you fill in the exact name of your folder name which you created in step 1.
Under Template: This has to be Divi if you are using Divi.
The other fields are optional to fill in.
Save this file as style.css and place it in your folder.
Step 3 create the functions.php file
Open your text editor again (new file) and place this snippet in there:
Save this file as functions.php and place it in your folder.
Step 4 create the screenshot.jpg file
This step is optional. You can create an image for your child theme. This image will show up in your WordPress dashboard (appearance > themes)
This can be anything you want for example your business logo. The preferable size of this image is 800x600 pixels.
Save your image with the name screenshot.jpg and place it in your folder.
In your folder there are now 3 files:
Step 5 upload your child theme
You can do this in 2 ways:
Compress your folder and upload it in WordPress as any other theme (and activate it).
Or you can upload it via ftp (if you choose this method then don’t compress the folder) and place it in the themes folder.