When updating the divi theme, making a Divi Child Theme is a great way to add advanced customization without worrying about erasing those changes. In fact, there are many benefits in the Divi Child Theme. This allows you to organize all your custom CSS / code in one place, making it easy to collaborate with others. This will help keep your code safe from customers who have access to custom code in theme customizers and settings.
Why Need To Create Divi Child Theme
An important reason for creating the child theme is to keep the modifications made by you while updating the parent theme. Whenever you update the theme(Divi theme), all theme files are updated, if you made any changes to these files, those changes will be lost.
Therefore, rather than directly modifying the theme files of the Divi, you can create additional theme files inside a child theme(Divi theme), when the themes are updated, those child theme files will remain unchanged.
When To Create Divi Child Theme
You should use a Divi Child Theme if…
- You are planning to make changes to the code of specific theme files (this includes page templates and functions such as PHP.)
- You want to add hundreds of lines of code (css, javascript, etc.)
- Even though it is possible to add places like your theme settings, but it becomes more difficult to manage with a lot of CSS.
- You want to cooperate with others and keep everything in an organized space to speed up the development time.
- You do not want to tag the customer in theme customizers / settings and break your code
When You Shouldn’t Create Divi Theme
You shouldn’t use a Divi Child Theme if…
- You plan to make minor theme modifications. Adding a small CSS or some scripts in the theme settings / customizers will not justify the need to make child theme, if you are planning to make everyone.
- You do not plan to cooperate with the team.
What You Need to Create a Divi Child Theme
To create a Divi Child theme, you need the following:
- Divi theme installed and activated.
- Text editor to edit theme files You can use text editor that comes with Windows or Mac, but if you plan to create a habit of editing these files, then Atom, Sublime, Notepad + With the help of a text editor, you will help more in editing files.
- FTP Client – If you plan to upload WordPress to your child theme as a zip file, then it is not necessary.
- But if you are trying to access theme files for a live site, then you will need an FTP client like FileZilla, so that you can use, edit, add, or delete files of things.
There should be three things in a child theme:
Contact your human buy cialis find out that now services supplier immediately if your erection proceeds with longer than for a long time.
- Like all themes, a child theme directory (or folder), your child theme folder will be present in your WordPress Themes folder, which keeps your child’s theme files.
- A style.css file (which will be used to store your child theme css).
- One Functions Php file – At the original level, this file will be wp_enqueue_scripts, which will encode the original theme stylesheet.
Create Divi Child Theme Directory
By two ways you can add child theme files to wordpress.
- You can directly add child theme folders in WordPress theme files (FTP or locally).
- Or you can create a folder outside of WordPress which can later be uploaded as a an zipped file in the WordPress.
In order to create a new folder directly for your child theme in WordPress, you will need to access your theme files located in the WordPress Themes folder (wp-content / themes /).
Then create a new folder inside the Themes folder and name it “divi-child” so the new child theme directory will be wp-content / themes / divi-child.
If you are creating the Child Theme folder and after uploading it to WordPress, you can simply create a new folder on your computer and name it as “divi-child”.
Upload and Activate Your Child Theme
After creating your child theme folder, style.css file, and functions php file, your child theme is ready for uploading and activation.
At this point, make sure that your Divi theme has been uploaded so that your child theme will work after activation. After creating child theme folder, style css file, functions and php file, your child is ready to upload and activate the theme.
At this point, make sure your device theme is uploaded so that your child theme can work after theme activation. If you add the child themes folder and file directly to the WordPress themes directory, there is no need to upload the theme to WordPress. It’s already there.
Just go to the WordPress Dashboard and navigate to Appearance> Themes, hovering over your child’s subject and clicking the Activate button. Your Child theme will activate.
Testing Child Theme
If your child them is working correctly, to test it, add some CSS to your child’s subject style.css file and save your changes.
You can than see those changes on the live site. If you have a cached page, you may have to open your page in a personal browser.