Based on :https://www.elegantthemes.com/blog/divi-resources/divi-child-theme
Steps
- Login to elegant themes website and download latest Divi Theme with builder version.
- Upload zipped ‘Divi’ WordPress theme
- Configure username and API key for ‘Divi’ theme
- Create Divi “Child” Theme
- Edit Style.css
- Edit Functions.php
- Add Screenshot.png
Divi Child Theme
- Open web hosting cPanel or File Manager
- Browse to \wp-content\themes\
- Create folder ‘divi-child’
Configure Divi-Child Theme Folder
- Create the following files and folders in the ‘divi-child’ folder
- style.css
- functions.php
Style.css
Edit style.css and add the following syntax then save file.
/*
Theme Name: Divi Child Theme
Theme URI: https://www.elegantthemes.com/gallery/divi/
Description: Divi Child Theme
Author: Elegant Themes
Author URI: https://www.elegantthemes.com
Template: Divi
Version: 1.0.0
*/
/* =Theme customization starts here
------------------------------------------------------- */
Functions.php
Enqueue your parent and child theme stylesheets.
- First must get Enqueue syntax from Divi Parent Theme
- Using File Manager browse to \wp-content\themes\divi
- View / Edit functions.php
- Search for the following
- wp_enqueue_style()
- It should be followed with get_stylesheet_uri()
- Confirm the style name which in most cases is called “divi-style”
- Using File Manager browse to \wp-content\themes\divi-child
- Edit functions.php and add the following syntax then save file.
- wp_enqueue_style()
<?php
function
my_theme_enqueue_styles() {
$parent_style
= 'divi-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'
);
?>
Screenshot (Thumbnail)
Upload screenshot.png to \wp-content\themes\divi-child
Activate Theme
Navigate to Appearance > Themes
- Click Activate on Divi Child Theme.
More modifications.
More coming soon…..
0 Comments