• Hello,

    I am having an issue with my beaver builder background on my home page disabling when I have the following code activated:

    function _remove_script_version( $src ){
    $parts = explode( ‘?ver’, $src );
    return $parts[0];
    }
    add_filter( ‘script_loader_src’, ‘_remove_script_version’, 15, 1 );
    add_filter( ‘style_loader_src’, ‘_remove_script_version’, 15, 1 );

    Is there a way to exclude certain resources with a ? in the url. So I can exclude those images that are lost by this?

    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter semperaye

    (@semperaye)

    I’ve tested using w3tc instead, and w3tc seems to know how to avoid certain resources. W3tc only eliminates a few of the query strings however, so it would still be nice to know if there was another way because this php code really speeds everything up.

Viewing 1 replies (of 1 total)

The topic ‘Removing query strings from static resources with PHP’ is closed to new replies.