One of the advantages of Divi is the vast amount of child themes available. There are different types of themes and they can be used in different ways for different reasons. You can use a pre-designed theme or a blank theme. Not only are there plenty of predesigned child themes to choose from, but you can make your own. As you can already see, Divi child themes can also be a confusing topic.
I see a lot of people asking about child themes. Many Divi users want to know what they are and if they need one. In this article, we’ll look at what a Divi child theme is, when it is needed, when it isn’t needed, how to build them, and how to install them. We’ll even take a quick look at how to package them for sale.
What is a Divi Child Theme?
A child theme is a theme that requires another theme, called a parent theme, to operate. It gets its functions from the parent theme, but it can have separate styling and add new features. Parent themes are updated regularly to fix bugs, add new features, improve the code, make them faster, and make them more secure.
Any changes made to the parent theme’s files will be lost when the theme is updated. The solution is to make those changes to a child theme. When the parent theme is updated, the child theme remains untouched.
Divi is a parent theme. You can add a Divi child theme to your Divi website to add code to the theme files or to change your website’s design. A Divi child theme can be added to your website at any time.
There are two main types of Divi child themes and they have different purposes.
Blank Child Theme
A blank child theme doesn’t contain any pages or designs. It has a php.functions file, a CSS stylesheet, and any other files you want to add. Since it doesn’t include pages, layouts, or customizations, the website needs to be designed. You can customize it once it’s installed.
Predesigned Child Theme
A predesigned child theme includes pages, menus, and other features so you don’t have to design your website before going live. Simply install the child theme, import the files, and then add your content. They can provide you with a professionally designed website at a fraction of the cost of hiring a designer. They can also give you a head start on creating your designs.
When You Need a Child Theme
Whether or not you need a blank child theme depends on the types of customizations you want to make.
Whether or not you need a predesigned child theme depends on the amount of time and money you want to save. Predesigned child themes are a turn-key solution to get a professionally designed website running as fast as possible.
If you’re making changes in the theme files, such as PHP or JavaScript, Then you need a child theme. These files will update when you update Divi. If you’ve made these changes in the parent theme, then you’ll lose your files. If you make those changes in the child theme, they will remain untouched.
When You Don’t Need a Child Theme
If you’re only using layout packs, designing your layouts with the Divi Builder, making adjustments in the theme customizer, making changes in the theme options, adding code to the theme options or Divi modules, and adding CSS to the theme options or Divi modules or page options, you don’t need a child theme. None of these areas are overwritten when Divi updates. They’re all stored in your WordPress database.
How to Build a Child Theme
There are several ways to build a child theme.
Using a Child Theme Generator
One of the easiest ways to make a blank child theme generator like the one here at Divi Cake. Enter the information and then download your child theme.
The child theme will include a functions file, screenshot, and CSS stylesheet.
Child Theme Plugin
Several good plugins will create a child theme from your parent theme. Divi Children is the only one that’s designed specifically for Divi. It’s a free plugin that creates a Divi child theme with a single button click. It also adds lots of new customization features to the theme customizer.
Fill in the fields, add a screenshot, and click Create Divi Child Theme. You can also update the child theme from here.
The child theme will include the stylesheet, functions, sidebar, single, and other theme files.
To create a blank Divi child theme manually, you’ll need to create a folder and add two files (functions.php and style.css) and zip the folder. I also recommend adding a screenshot. Other files such as sidebars, footers, etc., can be added as well.
Here are the files you’ll need and how to create them.
PHP Functions File
The functions.php file will inform WordPress that it’s using a child theme and that it should get certain functions from the parent theme. Create a file with a text or code editor and name the file functions.php. Add this code:
<?php
add_action( ‘wp_enqueue_scripts’, ‘my_enqueue_assets’ );
function my_enqueue_assets() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );
}
?>
CSS Stylesheet
The style.css file provides information to WordPress about your parent theme and child theme. Create a file with a text or code editor and name the file style.css. Add this code with your information:
/*---------------------------------------------------------------------------------
Theme Name: your theme name
Theme URI: http://yoururl.com/
Description: A child theme for Divi
Author: your name
Author URI: http://yoururl.com
Template: Divi
Version: 1.0.0
—————————— ADDITIONAL CSS HERE ——————————*/
Screenshot
The screenshot is the image that displays in the Themes list within WordPress. Create a JPG or PNG image at 800 x 600 pixels named screenshot.
Zipped File
Next, zip the file and provide it the name of the child theme. The child theme is now ready to upload to any website that uses Divi.
How to Install a Divi Child Theme
Upload the child theme in the same way you’d upload any WordPress theme. You must first have Divi installed (which installs the same way as a child theme). With Divi installed, go to Appearance > Themes in the WordPress dashboard and select Add New. Select Upload Theme, navigate to and select the zip file on your computer, and click Install Now.
Once the child theme is uploaded, select Activate.
Your child theme is now the active theme. If it’s a blank theme, there will be no changes to the design of your website.
Pre-designed themes will look like a blank theme at first, so there will be no changes to your website until the demo data is imported. If the child theme has demo data it will provide information on how to import it in the download file or as onscreen prompts.
Editing Your Divi Child Theme
Your child theme files can be edited in several ways. Edit the files within WordPress using the WordPress theme editor (go to Appearance > Theme Editor). Or, edit them offline using a text or code editor and then re-upload your child theme, paste the code into the theme editor, or upload the files you’ve changed using FTP to upload them to your child theme’s folder on your server.
Packaging a Divi Child Theme for Sale or Reuse
You can package your child theme for sale or reuse on other websites. There are several ways to package a child theme.
Easy Demo Import
Easy Demo Import is a premium plugin that lets you create a child theme or layout package with a single click. Import and export demo content. The content includes your pages, posts, media files, menus, active plugins, customizer CSS, widgets, categories, tags, custom post types, custom taxonomies, Divi theme options, customizer settings, and Divi library. It also includes settings for WooCommerce, LifterLMS, and Give.
This is the solution that many professional Divi child theme sellers use to package their child themes for sale. It not only makes it easy to package the child theme, but it also makes it easy for customers to import the demo data of those child themes.
Packaging a Child Theme Manually
A free solution is to package the child theme manually. It isn’t difficult, but there are a lot of steps involved and it can time-consuming (especially if you run into problems). It does get easier once you get the hang of it.
Packaging the child themes manually is a 3-step process and it only requires a few free plugins. For detailed instructions, see the article How To Package a Divi Child Theme for Sale here at the Divi Cake blog.
Ending Thoughts
That’s our look at what Divi child themes are, whether or not you need one, and how to create them. There are lots of reasons to use a child theme, but you don’t always need one. Fortunately, if you do need one they’re not that difficult to make or use.
If you’re interested in creating a blank child theme for Divi that you can reuse, take a look at the Divi Cake child theme generator.
If you’re interested in a predesigned child theme for Divi, take a look at the themes area of the Divi Cake shop.
In a future article, we’ll go into more detail about creating child themes to make money with Divi.
We want to hear from you. Do you use a Divi child theme? Let us know about it in the comments.
0 Comments