I am using a wordpress theme, and the css file uploads with version number:
style.css?ver=1.2.8
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:
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.
That below given code may help you.
Taken from https://wordpress.stackexchange.com/questions/132282/removing-wordpress-version-number-from-included-files
That works for me, hope it will work for you as well.
Add this code to the functions.php of your theme.