Title: Theme Versioning &amp; Caching
Last modified: September 20, 2025

---

# Theme Versioning & Caching

 *  Resolved [Mahmoud Hossam](https://wordpress.org/support/users/moodyhosam/)
 * (@moodyhosam)
 * [8 months, 3 weeks ago](https://wordpress.org/support/topic/theme-versioning-caching/)
 * Hello Sydney team,
 * I hope you are having a good day. I was facing a caching problem related to the
   theme style sheets while using [Sydney child theme](https://docs.athemes.com/article/child-theme-for-sydney/).
   I found that the style sheets were always loaded with version `"20230821"` which
   prevented any changes in the child theme styles to be reflected unless the browser
   cache was cleared, even after changing the child theme’s version.
 * I think the fix for this problem is to update line 310 in the Sydney parent theme’s`
   functions.php` 
   from:`wp_enqueue_style( 'sydney-style', get_stylesheet_uri(),'','
   20230821' );` to:`wp_enqueue_style( 'sydney-style', get_stylesheet_uri(), '',
   wp_get_theme()->Version );`
 * This works for both parent and child theme.
   Regards,
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftheme-versioning-caching%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Masood Mohamed](https://wordpress.org/support/users/masoodmohamed/)
 * (@masoodmohamed)
 * [8 months, 3 weeks ago](https://wordpress.org/support/topic/theme-versioning-caching/#post-18649408)
 * Actually, using a hard-coded version in the parent theme is intentional and the
   correct approach. By keeping a fixed version, the parent stylesheet isn’t reloaded
   unnecessarily every time the site loads, which improves caching and performance.
   The version only needs to change when the parent theme itself is updated, not
   every time a child theme changes its CSS.
 * The child theme CSS always loads after the parent CSS, so it will override parent
   styles as long as the selectors are equal or more specific. If a child theme 
   style seems not to apply, it’s usually due to selector specificity, not the hard-
   coded version. In that case, the child theme can simply increase selector specificity
   or use standard overriding methods to ensure its styles take precedence.
 * In short, the hard-coded version is not a problem, it’s proper caching behavior,
   and the child theme works correctly on top of it.
 *  Thread Starter [Mahmoud Hossam](https://wordpress.org/support/users/moodyhosam/)
 * (@moodyhosam)
 * [8 months, 3 weeks ago](https://wordpress.org/support/topic/theme-versioning-caching/#post-18649507)
 * Hello Masood,
 * The correct approach is to enqueue styles with a _constant_ version, not _hard-
   coded_.
 * A hard-coded version results in the following at the front-end (using Sydney 
   [child theme](https://docs.athemes.com/article/child-theme-for-sydney/)):
 *     ```wp-block-code
       ...<link rel='stylesheet' id='parent-style-css' href='https://fayza.co.uk/wp-content/themes/sydney/style.css?ver=6.8.2' type='text/css' media='all' /><link rel='stylesheet' id='sydney-google-fonts-css' href='https://fayza.co.uk/wp-content/fonts/26e17d00d2b4a5b68937946aaa007f7e.css?ver=20250902' type='text/css' media='all' /><link rel='stylesheet' id='sydney-style-css' href='https://fayza.co.uk/wp-content/themes/mh-webdesign/style.css?ver=20230821' type='text/css' media='all' />...
       ```
   
    - **In the first line**
      The parent styling is loaded through the child theme.
      The child theme doesn’t pass any version argument while enqueuing the styles,
      thus the current WordPress version is used
    - **The second line**
      A font styling is enqueued by the parent themeA hard-coded
      version `"20250902"` is passed, but it isn’t a problem here
    - **The third line**
      The child theme styling is loaded using the parent’s theme`
      functions.php`A hard-coded version `"20230821"` is passed while enqueuing,
      which creates the caching problem when I updated the child theme or change
      the `style.css` file.Wasn’t changed/updated since [Sydney 2.26](https://themes.trac.wordpress.org/browser/sydney/2.26/functions.php)
 * Using a hard-coded version defies the main reason we use child themes; to be 
   able to customize the theme and `style.css` without being overridden by the parent
   theme or its updates.
 * My solution suggests a constant version as a long as the currently active theme
   isn’t updated, either Sydney itself or the child theme.
 * Regards,
 *  [Masood Mohamed](https://wordpress.org/support/users/masoodmohamed/)
 * (@masoodmohamed)
 * [8 months, 3 weeks ago](https://wordpress.org/support/topic/theme-versioning-caching/#post-18649727)
 * Hi Mahmoud Hossam,
   When Sydney releases a new version, they update both the CSS
   content and the version number in functions.php (if the CSS is updated), so the
   hard-coded version always reflects the actual file state, this method ensures
   proper caching and works well.
 * Managing separate versions for each file can feel a bit tedious, but from a technical
   standpoint, it’s the right approach, stylesheets should only reload when they’ve
   actually been updated.
   Regards,Masood
 *  [Kenneth Macharia](https://wordpress.org/support/users/kmacharia/)
 * (@kmacharia)
 * [8 months, 2 weeks ago](https://wordpress.org/support/topic/theme-versioning-caching/#post-18651834)
 * Hi [@moodyhosam](https://wordpress.org/support/users/moodyhosam/),
   Thank you 
   for bringing this issue to our attention.We have discussed the issue internally
   and we agree with your suggestion of removing the hard coded value. We have noted
   this down internally and we’ll be addressing this in a future theme update.I 
   hope this helps. Please let me know if you have other questions.Thank you!
 *  Thread Starter [Mahmoud Hossam](https://wordpress.org/support/users/moodyhosam/)
 * (@moodyhosam)
 * [8 months, 2 weeks ago](https://wordpress.org/support/topic/theme-versioning-caching/#post-18654919)
 * This is good news, thank you [@kmacharia](https://wordpress.org/support/users/kmacharia/)&
   [@masoodmohamed](https://wordpress.org/support/users/masoodmohamed/)!
 * I am going to mark it as resolved and I will be waiting for your next update.
    -  This reply was modified 8 months, 2 weeks ago by [Mahmoud Hossam](https://wordpress.org/support/users/moodyhosam/).
      Reason: bad american accesnt 😜

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Theme Versioning & Caching’ is closed to new replies.

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

 * 5 replies
 * 3 participants
 * Last reply from: [Mahmoud Hossam](https://wordpress.org/support/users/moodyhosam/)
 * Last activity: [8 months, 2 weeks ago](https://wordpress.org/support/topic/theme-versioning-caching/#post-18654919)
 * Status: resolved