Last active
February 18, 2017 13:59
-
-
Save nielslange/70c46ba7ffc959921753a31232e6da42 to your computer and use it in GitHub Desktop.
WordPress: Remove query strings
This file contains 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
<?php | |
//* Remove query strings | |
add_filter( 'script_loader_src', 'nl_remove_query_strings', 15, 1 ); | |
add_filter( 'style_loader_src', 'nl_remove_query_strings', 15, 1 ); | |
function nl_remove_query_strings( $src ){ | |
$parts = explode( '?ver', $src ); | |
return $parts[0]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment