hey @alexzaragoza21, that would be;
add_filter(‘autoptimize_filter_noptimize’,’submit_noptimize’,10,0);
function submit_noptimize() {
if (strpos($_SERVER['REQUEST_URI'],'submit-here')!==false || strpos($_SERVER['REQUEST_URI'],'upload-file')!==false) {
return true;
} else {
return false;
}
}
hope this helps,
frank
SKP
(@skpolume)
Hi Frank,
I used the following code above and modified it:
add_filter(‘autoptimize_filter_noptimize’,’submit_noptimize’,10,0);
function submit_noptimize() {
if (strpos($_SERVER[‘REQUEST_URI’],’submit-here’)!==false || strpos($_SERVER[‘REQUEST_URI’],’upload-file’)!==false) {
return true;
} else {
return false;
}
}
But that doesn’t seem to be working on my page. When I turn off AO then the submit button works.
Hope you can assist me!
SKP
(@skpolume)
add_filter(‘autoptimize_filter_noptimize’,’submit_noptimize’,10,0);
function submit_noptimize() {
if (strpos($_SERVER[‘REQUEST_URI’],’player-registration’)!==false ){
return true;
} else {
return false;
}
}
can you share the URL on which you’re trying that @skpolume ?
SKP
(@skpolume)
I have turned off AO for now so that I can have people registered. Please let me know if you are going to be taking a look at it so I can turn it on.
Thanks
SKP
(@skpolume)
@optimizingmatters
I have turned off AO for now so that I can have people registered. Please let me know if you are going to be taking a look at it so I can turn it on.
Thanks
https://grandrapidsrugby.com/player-registration/
let’s take a step back first; where/ how did you add the code from this reply of yours @skpolume ?
OK, and how/ where did you add it to your site?
SKP
(@skpolume)
I added it to the functions.php of my child theme. Was that the right place to add it?
@optimizingmatters
It _should_ work that way, but apparently it did not, so maybe try adding it using the code snipppets plugin instead?
SKP
(@skpolume)
Okay thank you I will give it a try. @optimizingmatters