Skip to content

Instantly share code, notes, and snippets.

@wpsitesimple
Created June 1, 2016 23:55
Show Gist options
  • Save wpsitesimple/1a0b934bdf33117f791f71deef72aad2 to your computer and use it in GitHub Desktop.
Save wpsitesimple/1a0b934bdf33117f791f71deef72aad2 to your computer and use it in GitHub Desktop.
Remove query strings from CSS and JS inclusions
//* Remove query strings from CSS and JS inclusions
function _remove_script_version($src) {
$parts = explode('?ver', $src);
return $parts[0];
}
add_filter('style_loader_src', '_remove_script_version', 15, 1);
add_filter('script_loader_src', '_remove_script_version', 15, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment