• Resolved rifatspir

    (@rifatspir)


    I have changed the default admin, login urls so I need to exclude these pages. How do I exclude these pages?
    Give me the code where I can add more pages later.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    AO does not optimize those pages, so unless you replaced the pages (and not just changed the URL) there should be no need. But you can find example code in this reply I posted earlier today ??

    hope this helps,
    frank

    Thread Starter rifatspir

    (@rifatspir)

    Just for test purpose, I need to find out a bug cause.

    Ok If I want to exclude example-admin & example-login page then I need put the below code in child function php?

    add_filter(‘autoptimize_filter_noptimize’,’submit_noptimize’,10,0);
    function submit_noptimize() {
    if (strpos($_SERVER[‘REQUEST_URI’],’example-admin’)!==false || strpos($_SERVER[‘REQUEST_URI’],’example-login’)!==false) {
    return true;
    } else {
    return false;
    }
    }

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    that looks OK, yes ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Exclude pages’ is closed to new replies.