WordPress Versioning

February 14, 2023
// remove wp version number from scripts and styles
function remove_css_js_version( $src ) {
    if( strpos( $src, '?ver=' ) )
        $src = remove_query_arg( 'ver', $src );
    return $src;
}
add_filter( 'style_loader_src', 'remove_css_js_version', 9999 );
add_filter( 'script_loader_src', 'remove_css_js_version', 9999 );

TAGS: nerd talk

The Shop



Handmade knit hats made from 100% baby alpaca yarn.

Interested in placing a custom order?

INQUIRE NOW

Wisdom becomes knowledge when it is person experience