Correct Poor Query Strings

Improve your WordPress site's performance score. This code snippet will fix Poor Query Strings issue that GT Metrix detects.

When optimizing page speed, you will often get an issue related to query strings ending with a question mark. This fixed it.

Add the following code snippet to your theme functions.php file

/** THIS IS INTENDED TO IMPROVE THE POOR QUERY STRINGS ISSUE AT GT METRIX **/
function pu_remove_script_version( $src ){
    return remove_query_arg( 'ver', $src );
}
add_filter( 'script_loader_src', 'pu_remove_script_version' );
add_filter( 'style_loader_src', 'pu_remove_script_version' );

Hire a WordPress Expert

Get hourly and project based theme customization, theme tweaks, and development help from an experienced Kelowna WordPress developer.  We’ve been building WordPress websites full-time for over a decade. We can help you.