• Resolved brando71

    (@brando71)


    In order to achieve that result, I added this code to functions.php

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

    this lines works like a charm, but actually I need this couple of css files (from GD Star Ratings plugin) to be untouched:

    /wp-content/plugins/gd-star-rating/css/gdsr.css?ver=1.9.20
    /wp-content/gd-star-rating/css/rating.css?ver=1.9.20

    Any idea about how to set a filter to exclude a particular css/js file from the above script code?

    Thanks in advance for the help.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove Query Strings from static resources’ is closed to new replies.