Remove Query Strings from Static Resources

function _remove_script_version( $src ){
	$parts = explode( '?ver', $src );
	return $parts[0];
}
add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );
The following two tabs change content below.

Leave a Reply

Your email address will not be published. Required fields are marked *