How to Create a Divi Child Theme

How to create a child theme for Divi
Easily create a Divi-Child theme, and create a new photo for the theme that will show up in your WordPress Dashboard!
Share on facebook
Share on twitter
Share on linkedin
Share on pinterest

To Create a Divi Child-theme, you need access to your WordPress theme files.  I highly recommend backing up your site prior to starting this.  To find your Theme files, open up your file manager, or preferred FTP client, and navigate to your websites root directory.  Then, navigate to the Themes directory, located inside of the wp-content folder.  Example:  root/wp-content/themes

how to install a child theme for divi

Locate the themes folder, and create a new folder called ‘Divi-Child’.

create the child-theme folder inside of the themes folder, and name it child

Now that you have created your Child Theme folder, you are going to add a file called style.css. This is the first of 3 files that will make up your child theme.

Open your text editor and create a new file with the following CSS header at the top of the document.

memory_limit = 256M
upload_max_filesize = 256M
post_max_size = 256M
max_execution_time = 300
max_input_vars = 2500

CSS

Fill out the rest of the information for the child theme CSS header to fit your site as needed.

Save your new file with the name and extension “style.css”. And add it to the child theme folder:

name your css file style.css and save it to your child theme folder

The next file you need to add to your child theme folder ‘functions.php’.

If your file manager has an html editor, create a new file named ‘functions.php‘.  If you don’t have an editor in your file manager, go back to your text editor and create another new file named functions.php. Add the following php code to the very top of the document:

<?php 
function my_theme_enqueue_styles() {
    $parent_style = 'parent_style';
    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style',
        get_stylesheet_directory_uri() . '/style.css',
        array( $parent_style ),
        wp_get_theme()->get('Version')
    );
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
?>

PHP

Save the file with the exact name and extension “functions.php” and add it to your child folder:

Finally, you will need to copy two files over from Divi main theme folder.  Jump over to wp-content/themes/Divi, and copy ‘screenshot.jpg‘, which will be used for the image of your Child Theme in your WordPress dashboard, as well as ‘single.php‘, which you can use to create variations of different post types.

single.php is the theme file from the parent theme that you need to copy over to your child theme folder to create multiple post layouts

This is the screenshot.jpg I have saved for my Child Theme, which turns it a different color in your WordPress Dashboard.  A pretty cool look! 

Upload ‘screenshot.jpg‘ to your Child Theme folder.

How to create a child theme for Divi

More To Explore

About The Author

Scroll to Top