Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter bheching

    (@bheching)

    Thank you, Shahin and team. Very much appreciated!

    Thread Starter bheching

    (@bheching)

    Hi Shahin,

    thank you for getting back to me. Let me elaborate a bit. Functions.php of OceanWP 4.0.5 contains following lines:

    $main_script_dependencies = array( 'jquery' ); (line 517)
    ...
    wp_enqueue_script( 'oceanwp-full-screen-mobile-menu', $dir . 'full-screen-mobile-menu.min.js', $main_script_dependencies, $theme_version, true ); (line 583)

    I wonder why jQuery is set as a dependency for any of your scripts, if you are fully utilizing vanilla JS.

    I’m probably just missing something but I thought i’d ask, since I ran into problems unloading jQuery while keeping the “child” scripts loaded using Asset CleanUp in combination with Wp-Optimize’s Minification Feature. (a bit tricky to explain)

    Best regards and have a great day!

    Thread Starter bheching

    (@bheching)

    Thank you for looking into into my issue and your detailed explanation! Will consider upgrading then.

    Thread Starter bheching

    (@bheching)

    Hi wpmansour,

    thanks for your super fast response! I’m having a hard time to make the snippet work though.
    I added

    function custom_wpo_cache_ignore_query_variables( $exclude ) {
        $new_variables = array('utm_source', 'utm_campaign', 'fbclid');
        $exclude = array_merge($exclude, $new_variables);
        return $exclude;
    }
    add_filter('wpo_cache_ignore_query_variables', 'custom_wpo_cache_ignore_query_variables');

    to the Themes’ functions.php, flushed WPO-Cache and visited mydomain.com/?fbclid=1 in an Incognito Tab.

    The result was (WP-Debug enabled):

    <!-- WP Optimize page cache - https://getwpo.com - Page not served from cache because: In the settings, caching is disabled for matches for one of the current request's GET parameters -->

    I then tried adding the Snippet via WPCode and via muplugin – with the same result. Changing the Theme to Twenty Twenty-Four didn’t help either.
    So maybe i’m missing sth.? Any ideas why it’s not working?

    Best regards!

Viewing 4 replies - 1 through 4 (of 4 total)