Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ammij

    (@ammij)

    That was the culprit. Simple Lightbox did not appear in the JS exclude list for SG Optimizer, but did in CSS exclude lists. I excluded the CSS for Simple Lightbox as a first step. I discovered turning off the “Defer Render-blocking JavaScript” feature in the frontend optimization, and adding the following snippet to remove the lightbox from combination and minification fixed the issue – and did not slow my site down noticeably according to GTMetrix.

    add_filter( 'sgo_js_minify_exclude', 'js_minify_exclude');
    function js_minify_exclude( $exclude_list ) {
        $exclude_list[] = 'slb_core';
        $exclude_list[] = 'slb_view';
    	$exclude_list[] = 'slb-asset-slb_baseline-base';
    	$exclude_list[] = 'slb-asset-slb_default-base';
    	$exclude_list[] = 'slb-asset-item-base';
    	$exclude_list[] = 'slb-asset-ui-base';
    	$exclude_list[] = 'slb-asset-image-base';
    
        return $exclude_list;
    }

    I found this script instruction at https://www.ads-software.com/support/topic/how-to-use-sg-optimizers-filters-procedure/.

    Thread Starter ammij

    (@ammij)

    • Theme (include link): Astra Theme (https://wpastra.com/)
    • Post type: Standard
    • Post Template used: Site Origin
    • Details on how image is added to post: Normal Gallery Widget
    • Other plugins installed: Astra Pro, Astra Widgets, Customizer Export/Import EmedPress, Official Statcounter, Page Builder by SiteOrigin, Portfolio, Query Monitor, reCatcha by BestWebSoft, Simple Lightbox, SiteGround Optimizer, SiteGround Security, SiteOrigin Widgets Bundle, Smart Slider 3, Smash Balloon Instagram Feed, Smush Pro, SyntaxHighlighter Evolved, TranslatePress – Business, TranslatePress – Multilingual, Ultimate Member, Ultimate Member – reCAPTCHA, Updraft Plus, Backup\Restore, WP Recipe Maker, WPMU DEV Dashboard
    • Screenshot of SLB’s settings page: All settings default, expect Dark Theme.
Viewing 2 replies - 1 through 2 (of 2 total)