How can I exclude two pages from optimization using Autoptimize snippet given below
up vote
0
down vote
favorite
I hope someone can help me here. How can I use this Autoptimize snippet to exclude two pages from optimization. The code below excludes the page "https//www.nameofsite/submit-an-article"
add_filter(‘autoptimize_filter_noptimize’,’submit_noptimize’,10,0);
function submit_noptimize() {
if (strpos($_SERVER[‘REQUEST_URI’],’submit-an-article’)!==false) {
return true;
} else {
return false;
}
}
I want to exclude also another page-->"https//:www.nameofsite.com/upload/file" I modified and tried to use the code below but it gave me an error.
add_filter(‘autoptimize_filter_noptimize’,’submit_noptimize’,10,0);
function submit_noptimize() {
if (strpos($_SERVER[‘REQUEST_URI’],’submit-an-article’, 'upload-
file')!==false) {
return true;
} else {
return false;
}
}
Perhaps, I did something wrong with code? Hope someone can help me here. I am just a newbie. Not really familiar in php. Thank you in advanced.
code-snippets
add a comment |
up vote
0
down vote
favorite
I hope someone can help me here. How can I use this Autoptimize snippet to exclude two pages from optimization. The code below excludes the page "https//www.nameofsite/submit-an-article"
add_filter(‘autoptimize_filter_noptimize’,’submit_noptimize’,10,0);
function submit_noptimize() {
if (strpos($_SERVER[‘REQUEST_URI’],’submit-an-article’)!==false) {
return true;
} else {
return false;
}
}
I want to exclude also another page-->"https//:www.nameofsite.com/upload/file" I modified and tried to use the code below but it gave me an error.
add_filter(‘autoptimize_filter_noptimize’,’submit_noptimize’,10,0);
function submit_noptimize() {
if (strpos($_SERVER[‘REQUEST_URI’],’submit-an-article’, 'upload-
file')!==false) {
return true;
} else {
return false;
}
}
Perhaps, I did something wrong with code? Hope someone can help me here. I am just a newbie. Not really familiar in php. Thank you in advanced.
code-snippets
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I hope someone can help me here. How can I use this Autoptimize snippet to exclude two pages from optimization. The code below excludes the page "https//www.nameofsite/submit-an-article"
add_filter(‘autoptimize_filter_noptimize’,’submit_noptimize’,10,0);
function submit_noptimize() {
if (strpos($_SERVER[‘REQUEST_URI’],’submit-an-article’)!==false) {
return true;
} else {
return false;
}
}
I want to exclude also another page-->"https//:www.nameofsite.com/upload/file" I modified and tried to use the code below but it gave me an error.
add_filter(‘autoptimize_filter_noptimize’,’submit_noptimize’,10,0);
function submit_noptimize() {
if (strpos($_SERVER[‘REQUEST_URI’],’submit-an-article’, 'upload-
file')!==false) {
return true;
} else {
return false;
}
}
Perhaps, I did something wrong with code? Hope someone can help me here. I am just a newbie. Not really familiar in php. Thank you in advanced.
code-snippets
I hope someone can help me here. How can I use this Autoptimize snippet to exclude two pages from optimization. The code below excludes the page "https//www.nameofsite/submit-an-article"
add_filter(‘autoptimize_filter_noptimize’,’submit_noptimize’,10,0);
function submit_noptimize() {
if (strpos($_SERVER[‘REQUEST_URI’],’submit-an-article’)!==false) {
return true;
} else {
return false;
}
}
I want to exclude also another page-->"https//:www.nameofsite.com/upload/file" I modified and tried to use the code below but it gave me an error.
add_filter(‘autoptimize_filter_noptimize’,’submit_noptimize’,10,0);
function submit_noptimize() {
if (strpos($_SERVER[‘REQUEST_URI’],’submit-an-article’, 'upload-
file')!==false) {
return true;
} else {
return false;
}
}
Perhaps, I did something wrong with code? Hope someone can help me here. I am just a newbie. Not really familiar in php. Thank you in advanced.
code-snippets
code-snippets
asked Nov 7 at 5:56
Alex
31
31
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53184237%2fhow-can-i-exclude-two-pages-from-optimization-using-autoptimize-snippet-given-be%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password