Skip to content

Instantly share code, notes, and snippets.

@brynzovskii
Created January 12, 2018 22:26
Show Gist options
  • Save brynzovskii/f8575f8840a4d59ed229d25a3a15f11d to your computer and use it in GitHub Desktop.
Save brynzovskii/f8575f8840a4d59ed229d25a3a15f11d to your computer and use it in GitHub Desktop.
Remove WP Version From Styles
<?php
// Remove WP Version From Styles
add_filter( 'style_loader_src', 'sdt_remove_ver_css_js', 9999 );
// Remove WP Version From Scripts
add_filter( 'script_loader_src', 'sdt_remove_ver_css_js', 9999 );
// Function to remove version numbers
function sdt_remove_ver_css_js( $src ) {
if ( strpos( $src, 'ver=' ) )
$src = remove_query_arg( 'ver', $src );
return $src;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment