Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Frank Goossens

    (@futtta)

    yes, using the API you can, there’s example code in autoptimize_helper.php_example;

    assuming the posts with a contract have “contract” in the URL, this code will exclude those pages from optimizatoin:

    add_filter('autoptimize_filter_noptimize','beloved_ao_noptimize',10,0);
    function beloved_ao_noptimize() {
    	if (strpos($_SERVER['REQUEST_URI'],'contract')!==false) {
    		return true;
    	} else {
    		return false;
    	}
    }

    hope this helps,
    frank

    Thread Starter BelovedLovePhotography

    (@belovedlovephotography)

    Thank you for your quick reply. I will try this within the next hour or so and let you know if I succeed.

    Thread Starter BelovedLovePhotography

    (@belovedlovephotography)

    That worked to turn autoptimize off for these pages. Thank you.

    Unfortunately still left with a different bug it seems. ??
    (But your plugin works.)

    Plugin Author Frank Goossens

    (@futtta)

    fyi; you can easily test the impact of autoptimization by adding ?ao_noptimize=1 to the request and comparing results.

    good luck fixing your wp online contract woes!

    frank

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Autoptimize breaks WP Online Contracts’ is closed to new replies.