Versionning the stylesheet
-
Hello Kathryn !
I’m using a child theme of sorbet, and would like to version (query string) my stylesheet.
Until now, I was simply
@import url("../sorbet/style.css");
in my child stylesheet.After much reading, I’ve tried what’s suggested in the Codex, so that my (child) function.php now shows:
/** * JFM was here * enqueue css stylesheet 'the proper way' * cf. https://codex.www.ads-software.com/Child_Themes * */ add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'sorbet', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'sorbet-child', get_stylesheet_uri(), array( 'sorbet' ), 'jeff' ); }
Plz note the ‘jeff’ version ??
Unfortunately, this generates:
<link rel='stylesheet' id='sorbet-css' href='https://-----/wp-content/themes/sorbet/style.css?ver=4.0.1' type='text/css' media='all' /> <link rel='stylesheet' id='sorbet-child-css' href='https://-----/wp-content/themes/sorbet-child/style.css?ver=jeff' type='text/css' media='all' /> <link rel='stylesheet' id='sorbet-style-css' href='https://-----/wp-content/themes/sorbet-child/style.css?ver=4.0.1' type='text/css' media='all' />
I’m pleased with the two first <link>, but the third one seems originated from sorbet/function.php, line 115 (function sorbet_scripts), and I don’t know how to get rid of it…
Any help would be greatly appreciated
Merry Christmas !
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Versionning the stylesheet’ is closed to new replies.