I need help with a small issue.
I want the child theme style.css file to be loaded from scratch since I'm doing heavy graphic modification and no all the changes are properly loaded.
I know this can be done using the style.css?ver=XXXX.
I see that my website is now loading the version 5.3 that I imagine being the wordpress version running on the website atm.
What files (where and how) do I need to change to solve this problem?
Thanks!
I need help with a small issue.
I want the child theme style.css file to be loaded from scratch since I'm doing heavy graphic modification and no all the changes are properly loaded.
I know this can be done using the style.css?ver=XXXX.
I see that my website is now loading the version 5.3 that I imagine being the wordpress version running on the website atm.
What files (where and how) do I need to change to solve this problem?
Thanks!
Share Improve this question edited Dec 2, 2019 at 11:24 fuxia♦ 107k39 gold badges255 silver badges459 bronze badges asked Dec 2, 2019 at 10:29 GheesGhees 11 Answer
Reset to default 0you can define the version when enqueuing the file :
add_action("wp_enqueue_scripts", function () {
wp_enqueue_style(
"child-style"
, get_stylesheet_uri() // = get_stylesheet_directory_uri() . "/style.css"
, ["parent-style"]
, wp_get_theme()->version // use the child theme version
);
});