0

I'm using permalinks and I have a page with a slug like this:

http://www.mysite.com/jobs/

The page uses a specific template for itself.

On another page I have a form that I submit as POST to http://www.mysite.com/jobs/. However, when the form is submitted, it takes me to the proper /jobs/ page, but the template is not correct. Even though the url is correct. I appears to use maybe the index or default template for some reason. If I click in the address bar of the browser and press enter to re-visit the same page, then the proper template appears.

It's like submitting a POST form to this page makes it use the wrong template even though the permalink slug is exactly the same as when I visit it normally.

Any clues?

3

Make sure your form elements aren't using any names that WordPress uses, like name or s, this will cause the behavior you describe because it changes the type of query. Give them all names you are certain are unique.

3
  • One of my form inputs was named "s". That was the problem. I guess Wordpress was trying to treat it as a normal site search. Thanks a bunch! – Jake Wilson Sep 8 '11 at 15:39
  • I had a input named name... now I'm super-happy I found your answer! – estrar Jul 30 '14 at 20:45
  • My form input has the same as a custom post type and caused this problem. This note might help someone. – akamaozu Nov 2 '15 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.