Link (eg style.css) query string version uses parent version, should use child
-
The link rel=’stylesheet’ id=’consulting-thinkup-style-css’ rendered into the head of all pages to bring in the Consulting theme’s style.css appends a query string with the Consulting theme’s current version. This is standard practice of course.
The problem is, in a derived child theme the style.css is now that of the child theme, but the appended version is still the parent theme’s (Consulting’s) version. So that if changes are made to the child theme style.css that bump its version, the query string does not change to reflect it, and browsers don’t know to update their cached version. The result is the obvious one: either you have to force a cache update with F5 or you won’t see the changes.
This is managed on line 122 of consulting/functions.php where you have:
wp_enqueue_style( ‘consulting-thinkup-style’, get_stylesheet_uri(), ”, $consulting_thinkup_theme_version );
Instead of $consulting_thinkup_theme_version, please use wp_get_theme()->get(‘Version’)
- The topic ‘Link (eg style.css) query string version uses parent version, should use child’ is closed to new replies.