Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add Version Number to theme CSS file
// Version CSS file in a theme
// Uses a Unix Timestring to Version your CSS Files
wp_enqueue_style(
'theme-styles',
get_stylesheet_directory_uri() . '/style.css',
array(),
filemtime( get_stylesheet_directory() . '/style.css' )
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment