• Here is the simple solution to Remove query strings from static resources :

    In your theme’s function file (Appearance > Editor > Functions.php), add the following code before the closing PHP tag (%>) at the bottom of the file:

    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 );
  • The topic ‘Cool but not optimal’ is closed to new replies.