Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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!

share|improve this question
add comment

1 Answer

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
1  
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
add comment

Your Answer

 
discard

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.