Wordpress - Remove Version Number From CSS

admin

Administrator
Staff member
I am using a wordpress theme, and the css file uploads with version number:
<strong>style.css?ver=1.2.8</strong>

The problem is that when i change the css file, the browser keep loading the file without my changes. I can see that the changes were saved on the server, but nothing help to load the right file.

I tried:

Code:
function remove_cssjs_ver( $src ) {
if( strpos( $src, '?ver=' ) )
    $src = remove_query_arg( 'ver', $src );
return $src;
}
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );

But everything disappeared.

I read the other topics on the subject but nothing helped.

Thank you.