Skip to content

Instantly share code, notes, and snippets.

@chrisjreber
Created November 15, 2017 15:59
Show Gist options
  • Save chrisjreber/0996b0a014986a5ace3e9136c6505242 to your computer and use it in GitHub Desktop.
Save chrisjreber/0996b0a014986a5ace3e9136c6505242 to your computer and use it in GitHub Desktop.
WordPress CSS file version to prevent cache issues
// Enqueue the main Stylesheet.
$style_ver = filemtime( get_stylesheet_directory() . '/assets/stylesheets/foundation.css' );
wp_enqueue_style( 'main-stylesheet', get_template_directory_uri() . '/assets/stylesheets/foundation.css', array(), $style_ver, 'all' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment