How to use style.css in Elementor Child Theme

December 13, 2021

How to use style.css in Elementor Child Theme

screenshot

More tips

Download Hello Elementor Child Theme
Website template with "Hello Elementor Child Theme" text, featuring Metropol Parasol at night in Seville. Includes placeholder text and "Launch Project" button.
New Dynamic display conditions
dynamic display based on post attributes
How to make a “Hello Elementor” child theme
screenshot

Add the following code to the top of your functions.php file and anything underneath the top comments of your style.css file in your hello-elementor-child folder will be used on top of the default hello-elementor style.css file.


//* Enqueue style.css from child theme
function hello_elementor_child_enqueue_scripts() {
wp_enqueue_style(
'hello-elementor-child-style',
get_stylesheet_directory_uri() . '/style.css',
[
'hello-elementor-theme-style',
],
'1.0.0'
);
}
add_action( 'wp_enqueue_scripts', 'hello_elementor_child_enqueue_scripts', 20 );

We use cookies to enhance your experience on our website. Please accept or decline our use of cookies.