Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@schalkburger
Last active August 4, 2017 19:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schalkburger/5409de8ac469911c2c00 to your computer and use it in GitHub Desktop.
Save schalkburger/5409de8ac469911c2c00 to your computer and use it in GitHub Desktop.
Wodrdpress remove CSS and JS version number that is appended
function remove_cssjs_ver( $src ) {
if( strpos( $src, '?ver=' ) )
$src = remove_query_arg( 'ver', $src );
return $src;
}
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment