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

Is there an straight-forward example anywhere of using wp_update_post() to edit post_meta on the front end? I have not been able to find any good learning resources.

What I want to do is display post meta in an input field and when a user clicks submit trigger wp_update_post();.

post meta in input field with save button


share|improve this question
up vote 2 down vote accepted

wp_update_post isn't used for updating custom fields (ie postmeta content) - you should use update_post_meta

share|improve this answer
it's update_post_meta ;) – TheDeadMedic Jun 29 '11 at 14:33
@thedeadmedic - doh! annoying inconsistent WP function naming conventions. Corrected - thanks. – anu Jun 29 '11 at 14:34
Thank you for the correction. :) – mattrepublic Jun 29 '11 at 14:37

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.