Custom Code Not Working
-
On my WordPress (which is still in development) I’m trying to add a piece of custom code.
I’ve tested the custom code in a plain HTML document and it worked fine. But when I paste the code in a Code Block on my WordPress it doesn’t work anymore.Not let me first explain what the piece of code should do.
The piece of code contains an input form where users should find our companies nearest employee based on their zip code. They should enter their 4 digit (Dutch Zipcode’s contain only 4 digits) and the code simply checks between which preset values the zipcode lies. I’ve made some presets for zipcode i.e. if a user has zipcode 1100, the piece of code checks and notices it lies between 1000-2000 (which I put myself in the code) and on submit the page redirects to our employee based in Amsterdam (which has zipcode around 1060).I use Wordfence and got an error when I first used the form that Wordfence thinks it is XSS (Cross-Site Scripting, a type of Security Vulnerability). I tried marking this as trusted, but it simply doesn’t work. All it does now is redirect to our homepage, no matter what zipcode is filled in the form.
I was hoping you guys know some alternatives how to fix this. Maybe a plugin which is able to do this.
But for now I really don’t know how to handle this.– Daaan26
- The topic ‘Custom Code Not Working’ is closed to new replies.