PHP: Trim away ?ver= from WordPress header

 /* remove version from css and js for proper caching */
 function _remove_script_version( $src ){
 $parts = explode( '?', $src );
 return $parts[0];
 }
 add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );

Leave a Reply

Your email address will not be published. Required fields are marked *