Last active
August 29, 2015 14:16
-
-
Save ville6000/43fb55a103b8fa0233d2 to your computer and use it in GitHub Desktop.
Add dynamic version number to WordPress style.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function your_theme_styles() { | |
wp_enqueue_style( | |
'style', | |
get_stylesheet_directory_uri() . '/style.css', | |
false, | |
date( 'dmYhi', filemtime( get_stylesheet_directory() . '/style.css' ) ) | |
); | |
} | |
add_action( 'wp_enqueue_scripts', 'your_theme_styles' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment