Title: Versionning the stylesheet
Last modified: August 22, 2016

---

# Versionning the stylesheet

 *  Resolved [jmonesti](https://wordpress.org/support/users/jmonesti/)
 * (@jmonesti)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/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](http://codex.wordpress.org/Child_Themes),
   so that my (child) function.php now shows:
 *     ```
       /**
        * JFM was here
        * enqueue css stylesheet 'the proper way'
        * cf. http://codex.wordpress.org/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='http://-----/wp-content/themes/sorbet/style.css?ver=4.0.1' type='text/css' media='all' />
       <link rel='stylesheet' id='sorbet-child-css'  href='http://-----/wp-content/themes/sorbet-child/style.css?ver=jeff' type='text/css' media='all' />
       <link rel='stylesheet' id='sorbet-style-css'  href='http://-----/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)

 *  Thread Starter [jmonesti](https://wordpress.org/support/users/jmonesti/)
 * (@jmonesti)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/versionning-the-stylesheet/#post-5614532)
 * Okay…
 * Here is the piece of code I ended up with
 *     ```
       /**
        * JFM was here
        * enqueue css stylesheet 'the proper way'
        * cf. http://codex.wordpress.org/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' ), filemtime( get_stylesheet_directory() . '/style.css') );
       }
   
       add_action( 'wp_enqueue_scripts', 'theme_dequeue_styles', 20 );
       function theme_dequeue_styles() {
       	wp_dequeue_style( 'sorbet-style' );
       }
       ```
   
 * which generates
 *     ```
       <link rel='stylesheet' id='sorbet-css'  href='http://-----/wp-content/themes/sorbet/style.css?ver=4.0.1' type='text/css' media='all' />
       <link rel='stylesheet' id='sorbet-child-css'  href='http://-----/wp-content/themes/sorbet-child/style.css?ver=1419767419' type='text/css' media='all' />
       ```
   
 * I know I could have done everything in the function theme_enqueue_styles (giving
   it priority 20), but this slightly alters ordering of css inclusion…
 * Bye !

Viewing 1 replies (of 1 total)

The topic ‘Versionning the stylesheet’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/sorbet/1.2.3/screenshot.png)
 * Sorbet
 * [Support Threads](https://wordpress.org/support/theme/sorbet/)
 * [Active Topics](https://wordpress.org/support/theme/sorbet/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/sorbet/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/sorbet/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [Stylesheet](https://wordpress.org/support/topic-tag/stylesheet/)

 * 1 reply
 * 1 participant
 * Last reply from: [jmonesti](https://wordpress.org/support/users/jmonesti/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/versionning-the-stylesheet/#post-5614532)
 * Status: resolved