I'm trying to figure out why I'm not seeing the stylesheet version number is my browser, when I add the version number to the enqueue function, where I enqueue the stylesheet.

Here's the code:

wp_enqueue_style('sage/main.css', asset_path('styles/main.css'), array(), '1111111' );

Using the version number '1111111' just to test.

When I inspect in my browser, I still see the stylesheet without a version number (client name obscured for privacy):

<link rel="stylesheet" id="sage/main.css-css" href="http://localhost:8000/wp-content/themes/XXXX/dist/styles/main.css" type="text/css" media="all">

The styles are loading and everything else is correct, just missing the version number. What am I missing?

(This is a laravel site.)

  • 3
    If it's a Laravel site why (and how) are you using a WordPress function wp_enqueue_style()? Sep 22, 2022 at 21:04
  • Hey @JacobPeattie, great question. I found this resource online that explains how to integrate laravel with wordpress: wpengine.com/resources/wordpress-laravel Sep 23, 2022 at 13:16
  • As best I can guess, you're using Acorn and Corcel in your theme in order to use Laravel within WordPress?
    – bosco
    Sep 23, 2022 at 18:13
  • @bosco hm, I think a lot of people are getting stuck on the fact that it's a laravel site. I only mention it to explain the use of asset_path(), but the code in question - wp_enqueue_style is a wordpress function, and can be understood by someone who's not familiar with laravel. Oct 3, 2022 at 19:50

1 Answer 1


It appears you're using the Sage theme framework - presumably you're also using Soil? One of Soil's modules explicitly disables asset versioning - ensure that you haven't enabled in it in your theme by way of

add_theme_support( 'soil-disable-asset-versioning' );


add_theme_support( 'soil', [ 'disable-asset-versioning' ] );

If Soil is not responsible it could be any number of other plugins - in particular any sort of caching/optimization plugin.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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