I concur. Using the script above instead of the plugin yielded great results.
Plugin did not work for me 🙁
Thanks for the code. Any idea on why your code would do something to alter the size of fonts?… it seems to do something to my CSS file I guess.
Hi,
I added the code to my chold themes funtions.php and works great!
Before I got a F37 after the code a A 96
However there remain two url’s that still have the Query strings:
http://logologics.nl/testrij/wp-content/themes/canvas/includes/fonts/fontawesome-webfont.woff?v=4.0.3
http://logologics.nl/testrij/wp-content/uploads/smile_fonts/Defaults/Defaults.woff?6d70fz
Any idea what causes this and how to remove the strings here as well?
Thanks,
Annie
I added the code mentioned above to my functions.php but when I run it through http://tools.pingdom.com/ & https://gtmetrix.com they both give me a failing grade on “remove query strings on static resources”.
I’ve also seen this code posted in a few places:
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 );
add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );
When I use it my errors on the page speed testing sites remain. What’s the difference between the two? And any idea why neither are working?