Last active
January 14, 2019 13:37
-
-
Save FesoVel/b1da6a2ef6459296e3b8e6b27ce1122c 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
function remove_query_strings( $src ){ | |
$parts = explode( '?', $src ); | |
return $parts[0]; | |
} | |
add_filter( 'script_loader_src', 'remove_query_strings', 15, 1 ); | |
add_filter( 'style_loader_src', 'remove_query_strings', 15, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment