For A Shadier Tomorrow

Remove WordPress Version Query From Queued File’s URL

A request from an anon, who wants to remove WordPress’ version number from queued file’s URL.

As you may have realized when looking at a WordPress page’s source, the URL of some files called at the <head> section… they have our WordPress’ version at the end of the string.

I won’t dwell too far about it’s use… but the request is how to remove it, and that is what we’re gonna find out here.

The Code

add_filter( 'style_loader_src', 'shadythemesVerQueryBanisher' );
add_filter( 'script_loader_src', 'shadythemesVerQueryBanisher' );
function shadythemesVerQueryBanisher($url){
    return remove_query_arg( 'ver', $url );

PLace the code in your theme’s functions.php or use it as a plugin, your choice.

That’s all for now. Until we meet again!

Write a comment

Your email address will not be published. Required fields are marked *

About ShadyThemes

ShadyThemes is a shady group for hire.

We build shady websites using shady tools for whatever shady purpose the shady clients has in their shady mind.

As you may have guessed, everything you see around ShadyThemes website is coded by us, so I guess you can see them as our portfolios.

Just send us a message if you need our service.

Contact Form

Movies that sold itself on its production cost usually crashed and burned. Especially live action movies of anime. No one’s asking for those, damn it!