Created
May 21, 2017 00:15
-
-
Save eder-dias/385df9b4a454b05948818c6da8da6875 to your computer and use it in GitHub Desktop.
Remove query strings from static resources.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add this code to your theme’s functions.php | |
function ewp_remove_script_version( $src ) { | |
return remove_query_arg( 'ver', $src ); | |
} | |
add_filter( 'script_loader_src', 'ewp_remove_script_version', 15, 1 ); | |
add_filter( 'style_loader_src', 'ewp_remove_script_version', 15, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment