Hi
for speedreasons i need to know how to remove query strings from static resources.
I tried this in my functions.php but that does not help:
function _remove_script_version( $src ){
$parts = explode( '?', $src );
return $parts[0];
}
add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );
How to fix that your theme adds parameters to static ressources?
regards marcus
Hey MarcusJeroch,
Did you try a plugin like this? https://wordpress.org/plugins/remove-query-strings-from-static-resources/
Best regards,
Rikard
Hi Rikard
Please dont recommend me plugins in the first place. Every plugin slows down a bit.
I use a child theme and i need a solution via functions.php (or similar)
thanx marcus