Remove query strings from static resources in WordPress by adding this to your functions.php. You can also change the substring “?ver” to anything else you want to remove.
1 2 3 4 5 6 7 |
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 ); |
I think easy way can install if change theme a lot
https://wordpress.org/plugins/remove-query-strings-littlebizzy/
because, don’t need settings also.