The example of the code in example in autoptimize/autoptimize_helper.php:
add_filter('autoptimize_filter_noptimize','my_ao_noptimize',10,0);
function my_ao_noptimize() {
if (strpos($_SERVER['REQUEST_URI'],'no-autoptimize-now')!==false) {
return true;
} else {
return false;
}
}
where no-autoptimize-now is part of the URL of the page you’re trying to exclude.
If there is more pages to be exclude then
if (
(strpos($_SERVER[‘REQUEST_URI’],’no-autoptimize-now’)!==false) ||
(strpos($_SERVER[‘REQUEST_URI’],’dont-autoptimize-me’)!==false) ||
(strpos($_SERVER[‘REQUEST_URI’],’never-autoptimize-this’)!==false)
) {
the line breaks are just there for clarity