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



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

  • 1
    it's update_post_meta ;) Jun 29 '11 at 14:33
  • @thedeadmedic - doh! annoying inconsistent WP function naming conventions. Corrected - thanks.
    – anu
    Jun 29 '11 at 14:34

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.