Viewing 2 replies - 1 through 2 (of 2 total)
  • You can exclude inline script from being combined using the filter we’ve designed for that purpose. Here’s an example of the code, you can add to your functions.php file:

    add_filter( ‘sgo_javascript_combine_excluded_inline_content’, ‘js_combine_exclude_inline_script’ );
    function js_combine_exclude_inline_script( $exclude_list ) {
    $exclude_list[] = ‘first few symbols of inline content script’;

    return $exclude_list;
    }

    Plugin Author Stanimir Stoyanov

    (@sstoqnov)

    SiteGround Representative

    Hey @bagonyi

    As @kellscolin2020 already suggested, you can use the sgo_javascript_combine_excluded_inline_content filter to exclude inline js from the combination.

    Regards,
    Stanimir

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Excluding inline JavaScript from combination’ is closed to new replies.