Removing query strings from static resources with PHP
-
Hello,
I am having an issue with my beaver builder background on my home page disabling when I have the following code activated:
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 );Is there a way to exclude certain resources with a ? in the url. So I can exclude those images that are lost by this?
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Removing query strings from static resources with PHP’ is closed to new replies.