• Resolved rosbiffer

    (@rosbiffer)


    I can’t get Quick & Easy FAQs to play nicely with the SG Optimizer. It basically doesn’t work if Combined Javascipt Files is enabled. I’ve tried using the code snippet exclude lists as follows:

    	$exclude_list[] = 'quick-and-easy-faqs';
    	$exclude_list[] = 'quick-and-easy-faqs-js';
    	$exclude_list[] = 'quick-and-easy-faqs-js-extra';

    But it doesn’t work. Am I missing anything?

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter rosbiffer

    (@rosbiffer)

    Actually I’ve just seen a note in your sticky post saying:

    NOTE: The above solution won’t work if you enable CSS/JS combination

    So does that mean if I want to exclude some js from minification I have to leave combination off?

    Plugin Support Tsvetan Mitev

    (@tsvetanm)

    Hello @rosbiffer,

    The note in the sticky post refers to the JS/CSS minification. There is no need to have the combine JS/CSS feature off when you want to exclude scripts from the minification.

    That said, you should be able to exclude the Quick & Easy FAQs JS script from the combine option using the following filter:

    add_filter( 'sgo_javascript_combine_exclude', 'js_combine_exclude' );
    function js_combine_exclude( $exclude_list ) {
        $exclude_list[] = 'quick-and-easy-faqs';
    
        return $exclude_list;
    }
    

    You can add this code snippet to the functions.php file of the currently active theme. Just make sure to clear your browser, SiteGround Optimizer and server side cache(if you are a SiteGround customer you can flush the server side cache from Site Tools -> Speed -> Caching) once you include the code and test again.

    In case you are still experiencing issues, my recommendation is to check for any other scripts which might interfere with the JS combine option and exclude them as well. If you are a SiteGround customer, feel free to contact our Technical Support team from the Help Desk section of your Client Area and we will further look into this.

    Best Regards,

    Tsvetan Mitev

    Thread Starter rosbiffer

    (@rosbiffer)

    I have these in code snippets:

    add_filter( 'sgo_javascript_combine_exclude', 'js_combine_exclude' );
    function js_combine_exclude( $exclude_list ) {
    	$exclude_list[] = 'quick-and-easy-faqs';
    	$exclude_list[] = 'quick-and-easy-faqs-js';
    	$exclude_list[] = 'quick-and-easy-faqs-js-extra';
    	
    	return $exclude_list;
    }
    
    add_filter( 'sgo_js_minify_exclude', 'js_minify_exclude' );
    function js_minify_exclude( $exclude_list ) {
    	$exclude_list[] = 'quick-and-easy-faqs';
    	$exclude_list[] = 'quick-and-easy-faqs-js';
    	$exclude_list[] = 'quick-and-easy-faqs-js-extra';
    	
    	return $exclude_list;
    }

    It just seems to be a cache issue as it seems to work fine in Edge and in an incognito window in chrome but not in chrome itself…

    Plugin Support Tsvetan Mitev

    (@tsvetanm)

    The code snippets are correct and as far as I can see from my tests so far, they work as expected. The Quick & Easy FAQs JS scripts were successfully excluded from the combine and minify JS features of our plugin.

    The problem indeed appears to be cache related. What I can suggest you is to flush all of the browsing data related to the website in your Chrome browser and to try again.

    Best Regards,

    Tsvetan Mitev

    Thread Starter rosbiffer

    (@rosbiffer)

    Perfect, thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Not working with Quick & Easy FAQs’ is closed to new replies.