I just fiddled around with this and created this code below that removes the ?ver= Query Strings and this code below has the nice added benefit of allowing you to add additional Query String parameters. You would add this code in your theme functions.php file.
Important Note: Before deciding to use this code read this information about why you may not want to use this code: https://cometcache.com/kb-article/why-doesnt-comet-cache-remove-query-strings-from-static-resources/
// Removes: ?ver= Query Strings from URLs on the frontend of a website only and not the wp-admin backend area. // Note: If you add other Query String parameters to the qs_array_parameters array they will also be removed. // Example: array( 'ver', 'example' ); would also remove this Query String: ?example=something function remove_ver_query_strings( $src ) { $qs_array_parameters = array( 'ver' ); $src = esc_url( remove_query_arg( $qs_array_parameters, $src ) ); return $src; } // Remove ?ver= Query Strings on the frontend only and not wp-admin area. if ( ! is_admin() ) { add_filter( 'style_loader_src', 'remove_ver_query_strings', 10, 2 ); add_filter( 'script_loader_src', 'remove_ver_query_strings', 10, 2 ); }