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've created a Plugin which adds a new meta-box on the post.php dashboard page, containing a form. Whenever a POST request is submitted from that form, I would like to save some post meta-data.

I have been able to implement this, but I noticed that each time this POST request is sent, the entire blog post gets updated, including changes that were made outside my meta-box. It's as if I was pressing the default "Update" button instead of my own form submit button.

Is there a way to send a POST (or GET) request to post.php without having it interpreted as a request to save all changes to the blog post? There must be such a possibility, since refreshing that page from a browser does not cause the blog post to automatically be updated.

I know I could probably do this using AJAX, but I'd like to avoid that if possible. Also, I'm using WordPress 3.4.1.

share|improve this question
up vote 0 down vote accepted

The metabox itself sits inside a form which encompasses (almost) the entire page. You're metabox callback shouldn't print a form itself (since you'll end up with nested forms). Instead the meta data should be updated when the post itself is updated, using the save_post hook.

The only way of updating part of the post's metadata without updating the entire post is to use Ajax.

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.