0

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

Thanks!

1 Answer 1

2

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

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

Your Answer

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

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