#04 Divi Child Theme and Footer Template

by Ania

March 8, 2021

This is the code we’ve added in the style.css file:

/*
 Theme Name:   Webdesign Playground
 Description:  This is my child theme
 Author:       Ania R.
 Template:     Divi
 Version:      1.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  playground
*/

And this will enqueue our stylesheet and custom JS file. The code should be added in the functions.php file. And it really works! 😉

add_action( 'wp_enqueue_scripts', 'playground_enqueue_scripts_styles' );

function playground_enqueue_scripts_styles() {
    $parenthandle = 'divi-style'; 
    $theme = wp_get_theme();
    wp_enqueue_style( $parenthandle, get_template_directory_uri() . '/style.css', 
        array(),
        $theme->parent()->get('Version')
    );
    wp_enqueue_style( 'playground-style', get_stylesheet_uri(),
        array( $parenthandle ),
        $theme->get('Version')
    );
    wp_enqueue_script( 'playground-scripts', get_stylesheet_directory_uri() . '/js/playground-scripts.js',
    	array( 'jquery' ),
    	1.0,
    	true
    );
}

And here’s the updated version of the custom CSS we’ve added to style the comments module:

/* Single Post Comments */
@media (min-width:768px) {
	p.comment-form-comment {
		width: 51%;
    	float: left;
    	margin-right: 2%;
	}
}
p.comment-form-cookies-consent {
	clear:both;
}

#et_pb_submit:hover, .comment-reply-link:hover {
	transform: translateX(-4px) translateY(4px);
}

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *