Skip to content

Instantly share code, notes, and snippets.

@badfeather
Created February 22, 2014 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save badfeather/9163346 to your computer and use it in GitHub Desktop.
Save badfeather/9163346 to your computer and use it in GitHub Desktop.
Prevent caching of a Wordpress stylesheet by adding a timestamp to the URL
<link rel="stylesheet" href="<?php
echo get_stylesheet_uri()
. '?t=' . filemtime( get_stylesheet_directory() . '/style.css' );
?>" type="text/css" media="screen" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment