1

I've got a simple custom page template with a form on it. This page can process the form itself, so the entered data gets submitted there as well, using POST. Submitting the form, however, results in a 404 in my blog's regular theme (default template). If I leave out all of the data entry elements in the form, so I'll be submitting an entry form, it somehow works.

You can use this code to reproduce the error if you want to see for yourself.

Any suggestions as to what could be wrong are much appreciated, thanks!

1

2 Answers 2

1

You need to change:

<form action="index.php" method="post">

to:

<form action="" method="post"> 

I'm guessing that this is just a test case, but be sure that your final template has calls to wp_head and wp_footer in there.

1
  • Thank you so much! This problem really bugged me and I couldn't figure it out what was causing it. Really glad you've found out how to fix it! P.S: Just a test case indeed :).
    – Chris
    Jan 22, 2012 at 15:50
4

Are you using any of the wordpress reserved words in your html form? If yes that will give you a 404 page error when submitting.

http://codex.wordpress.org/Function_Reference/register_taxonomy#Reserved_Terms

1
  • Thanks for the link, but due to the prefix present in the code of my first post, I don't think I do - unless I'm misreading or forgetting something.
    – Chris
    Jan 21, 2012 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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