The code snippet bellow is pretty simple. It scans all the static files which are enqueued either by your plugins or by your themes. Whenever it finds an instance of ‘
?ver=' it removes it from the URL together with its parameters.
Stripping out query strings from your static files won’t harm your WordPress website. It will actually help your website improve Google page speed score and makes your site load even faster.
To use the snippet Just drop it into your functions.php file and you are done.