0

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!

0

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


});
  • Is this supposed to go in the function.php file? In the main or child theme folder? – Ghees Dec 2 '19 at 11:06
  • in functions.php of the child theme – Kaperto Dec 2 '19 at 11:12
  • So I'll paste the code there and I'll see. Thank you! – Ghees Dec 2 '19 at 11:23
  • I'm afraid this isn't working. I put the exact same code int the child theme function.php file, but it's still loading the old version of the style.css – Ghees Dec 5 '19 at 10:36
  • look the source in the browser to be sure to have style.css?ver=.... – Kaperto Dec 5 '19 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.