Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use version number to enable cache busting #7

Closed
darylbowers opened this issue Sep 12, 2019 · 1 comment
Closed

Use version number to enable cache busting #7

darylbowers opened this issue Sep 12, 2019 · 1 comment

Comments

@darylbowers
Copy link

darylbowers commented Sep 12, 2019

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 );

@rami-elementor
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants