How to remove query string from static resource in WordPress?

You can remove the Query Strings using this code in your functions.php

function _remove_query_strings( $src ){ 
    $parts = explode( '?', $src );  
    return $parts[0]; 
} 
add_filter( 'script_loader_src', '_remove_query_strings', 15, 1 ); 
add_filter( 'style_loader_src', '_remove_query_strings', 15, 1 ); //not need to in your case since it's for the CSS files