elementor / hello-theme-child

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use version number to enable cache busting

darylbowers opened this issue · comments

You could amend the functions.php as follows to use the version number of the child style.css file, and make cache busting simple.

function hello_elementor_child_enqueue_scripts() {
wp_enqueue_style(
'hello-elementor-child-style',
get_stylesheet_directory_uri() . '/style.css',
[
'hello-elementor-theme-style',
],
wp_get_theme()->get('Version')
);
}
add_action( 'wp_enqueue_scripts', 'hello_elementor_child_enqueue_scripts',99 );