• Melkham

    (@melkham)


    Plugin installed/activated
    Checking : (theme newspaper last release) ( theme activated Child)
    my function.php !!! no code found like

    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 );

    via Gtmetrix i still see many errors about :
    Remove query strings from static resources

    http://i0.wp.com/www.,,,,,,,.com/wp-content/uploads/2013/05/IPFire_Logo.png?resize=261%2C160

    How to check if the code has been installed ?
    adding above code manually to function.php child theme, break my site

    Please help!!

    Regards Mel

    https://wordpress.org/plugins/remove-query-strings-from-static-resources/

Viewing 1 replies (of 1 total)
  • @melkham: You got the wrong code… and that resize is from a plugin or your theme, and likely uses it, to know what size images should be delivered.

    What you want to remove, what this plugin removes, is the version info added after your .css and .js files

    If this plugin actually isn’t working for you (it does Not modify your function.php file, that is not how to test it is working), delete the plugin and carefully edit your function.php file with this:

    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 );

Viewing 1 replies (of 1 total)
  • The topic ‘no change in getmetrix’ is closed to new replies.