Remove WordPress version from JS and CSS files

Spread the love

I recently faced an issue while working on SEO of my blog. I figured that version numbers appended to js and css files is one of them, so thought of finding a way to remove wordpress version from js and css files.

To remove WordPress version from js and css files, we can use one of the following 2 methods.

Add the code for one of the below methods in your functions.php file placed at following path: /wp-includes/functions.php

The first method removes the “ver” parameter from all the enqueued CSS and JS files and the 2nd method removes the “ver” parameter only if its value matches the current WordPress version number of your website.

Method 1:

Method 2:

Read my other post: How to load WordPress posts using WP_Query