WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create a forum system using WP's custom post types - two post types as Topic/Reply and a Forum taxonomy.

I have created a singular template for the topic post type, in which I added a reply form. The problem is that when I submit the form I get a 404 page.

This is the form template:

<div class="topic-reply-form">
  <form method="post" name="topic-reply-form" class="topic-reply-form clear-block" action="<?php echo home_url('/'); ?>">
    <p><?php _ae("Add reply"); ?></p>
       <textarea id="reply-content" name="content" cols="50" rows="6"></textarea>
       <input type="hidden" name="topic" value="<?php the_ID(); ?>" />
       <?php wp_nonce_field('new-topic-reply'); ?>
       <input type="submit" value="Publish" id="reply-submit" name="reply-submit" />

Any ideas why this is happening?

share|improve this question
Please add your solution as answer so question can be properly resolved. – Rarst Feb 15 '11 at 19:13
up vote 2 down vote accepted

it was the "topic" name field. It seems you can't use reserved terms in $_POST, and "topic" is a post type name, so its probably one of them...

share|improve this answer

FYI to anyone else who finds this, also be mindful of how you name your nonces. If there's a conflict WP won't recognize the logic in your page that verifies the nonce. It'll give you a 404.

Not fun.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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