Lego2012
12/13/2016 - 9:37 AM

Development - Cache Bust your CSS

Development - Cache Bust your CSS

<?php
// Do NOT include the opening php tag

add_filter( 'stylesheet_uri', 'child_stylesheet_uri' );
/**
 * Cache bust the style.css reference.
 *
 */
function child_stylesheet_uri( $stylesheet_uri ) {
    return add_query_arg( 'v', filemtime( get_stylesheet_directory() . '/style.css' ), $stylesheet_uri );
}