• Resolved ioka92kfa

    (@ioka92kfa)


    We use GiveWP, and the donor dashboard does not work when Speed Optimizer is on —?specifically, when JavaScript minification is on. Their support staff identified a script that is not listed in the Minification exclusion menu. How do I add this script manually so that it is excluded? Otherwise I’ll have to completely deactivate JS minification entirely.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Georgi Ganchev

    (@georgiganchev)

    Hello @ioka92kfa,

    The handler responsible for this behavior should be excluded from minification and you can continue using this option on your website.

    You can exclude scripts from being minified 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_js_minify_exclude', 'js_minify_exclude' );
    function js_minify_exclude( $exclude_list ) {
      $exclude_list[] = 'script-handle';
      $exclude_list[] = 'script-handle-2';
    
      return $exclude_list;
    }

    More information and a full list of filters that can be used are found here:

    https://www.siteground.com/tutorials/wordpress/speed-optimizer/custom-filters/

    Best regards,
    Georgi Ganchev
    SiteGround.com

Viewing 1 replies (of 1 total)
  • The topic ‘Minify Option Missing JavaScript File’ is closed to new replies.