Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Remove query strings from static resources
function shameem_remove_cssjs_ver( $src ) {
if( strpos( $src, '?ver=' ) )
$src = remove_query_arg( 'ver', $src );
return $src;
}
add_filter( 'style_loader_src', 'shameem_remove_cssjs_ver', 10, 2 );
add_filter( 'script_loader_src', 'shameem_remove_cssjs_ver', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment