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 world-class WordPress developers at Codeable. If you’re in Kelowna and need a custom website for your business visit our Kelowna Web Design page now to get started.