As it turns out, the code does indeed work, and the reason the version number was being stripped out was due to a buried theme option that by default removes all version numbers from all JS and CSS files.
This is in the Jupiter WordPress theme by Artbees, and the theme option is in Theme Options > Speed Optimization > Query Strings from static Files. By default its set to “off” and that removes version numbers. Setting it to “On” appends version numbers as query string parameters. This is a very dumb option to be enabled by default, but now we know.
Related Posts:
- How to add crossorigin and integrity to wp_register_style? (Font Awesome 5)
- How to add extra attribute to stylesheet link?
- How to force stylesheet to load before anything else in header?
- To enqueue or not to enqueue
- I want to include my style.css in function.php file?
- Never Enqueued Stylehsheet
- Changes in enqueued / registered stylesheet paths not updating—why?
- Which is the best way to incorporate custom fonts?
- Additional CSS – crashing with javascript-html minifier?
- How do I view registered syles and scripts for enqueue
- stylesheet in header or functions?
- What is the difference between the different ways of linking stylesheets
- Enqueuing a stylesheet and ensuring it’s loaded before (not after) the theme’s stylesheet
- How to properly add my styles overriding current styles
- Can’t Workout Dependency of Stylesheets
- Homepage not loading correctly, but then loads when refreshing
- Custom admin bar css on front end bug
- Is it ever okay to include inline CSS in plugins?
- How important is it to enqueue a theme’s stylesheet?
- Remove Open Sans from Twenty Twelve theme
- Enqueue Google Web Fonts Without Messing Up Symbols In URL
- Inbuilt style for jquery-ui-datepicker
- Enqueue a stylesheet for login page and make it appear in head element
- WordPress admin stylesheet
- Why is the Child Theme Stylesheet Not Loading?
- Loading a child-theme’s style.css after the parent’s
- Add ‘title’ attribute to stylesheets with wp_enqueue_style()
- how to include other plugins css files in a shortcode?
- Is it possible to enqueue a raw CSS string directly from within a template file?
- Why I can’t add a CSS style in this WordPress theme?
- How to use wp_dequeue_style() for style enqueued in WP_Widget class
- Enqueue a css using negative conditional tags
- Remove inline css added by wp_add_inline_css
- Stylesheet from wp_enqueue_style is overwritten by plugin
- Why isn’t my theme processing SASS?
- wp_add_inline_style in plugin not working
- How to combine multiple CSS files and concatenate JavaScripts if WordPress recommends enqueuing them?
- Adding style sheet to specific page
- “wp_enqueue_style();” don’t load new edited style
- wp_enqueue_style in Plugin [duplicate]
- When enqueing a stylesheet, is it possible to remove the type attribute? [duplicate]
- Enqueue styles after a plugin
- Google fonts enqueue only imports last font family
- I register and enqueue stylesheet but nothing is rendered
- Prevent CSS/JS loading when plugin is not used
- Understanding child theme functions.php
- The correct way to include JavaScript and CSS in my WordPress Themes
- Is it possible to change the path of a css file that is registered through wp_enqueue_style()?
- Why are my styles being applied to the admin area?
- get_stylesheet_uri returns wrong path
- How to enqueue stylesheets?
- Dequeue a style file which is making website load slow!
- Best way to enqueue CSS and JS in a specific location
- Adding external stylesheet after ALL other styles
- Enqueue Style Only On Certain Pages Not Working
- How can I add style sheet link to my wordpress page
- Parent theme CSS overriding child CSS rules
- Stylesheet not loaded on register page
- Loading custom CSS
- wp_enqueue_style not working if the file is in a sub folder
- How to organize priority of plugins CSS files?
- why this media query is not working / not loading when I put it in child theme?
- CSS not affecting widget output
- Child theme stylesheet not always overriding “index”
- How do I use a color from theme options?
- Enqueuing a script before anything else
- my custom css file downloads then it STOPS!
- Child Theme CSS not showing at all
- Ideal inline dynamic CSS injection
- CSS only loads in backend
- str_replace inside specific css files [closed]
- make admin.css in my child theme
- theme style is applied on the dhasboard rather than the website
- Why is my wp_enqueue_style() not working?
- functions.php – inject inline css from file
- CSS getting injected into index from somewhere after theme/custom CSS is loaded, overriding all of my CSS [closed]
- How can I get this child theme stylesheet to properly load? Or if it is correct, why doesn’t my child theme appearance match the parent?
- I can’t add CSS with functions.php
- Load custom CSS before admin CSS
- Enqueue style for specific site type
- Why wp_enqueue_style() is adding CSS class?
- How to get rid off default css styles
- CSS not being applied using wp_enqueue_style
- Dequeing Parent Fontawesome Deques Parent Styles
- How to reference different css (bootstrap) stylesheets for the header and body of a page?
- Stylesheet does not load despite functions.php
- Bootstrap Integtration
- Move dashicons.min.css to Footer
- How to offload CSS and JS files from wp-content/themes folder?
- Stuck with Enqueue Styles for multiple css files in a child theme
- Different styles on multiple pages
- Unable to load stylesheet via wp_enqueue_style
- wp add inline style in loop
- How to make CSS load live based on options clicked in the theme customizer?
- wp_enqueue_style url is trimmed somehow
- Browser stacks different versions of style.css
- How to NOT override inline css rules
- Why is wp_enqueue_style not working?
- How to create my own style.css file in an wordpress child-theme
- How enqueue CSS out of theme folder?