Front-end update_post_meta with ajax

You should check out this document on WordPress.org: http://codex.wordpress.org/AJAX_in_Plugins

It gives you everything you need to create front-facing XHR functionality. Make sure to set a nopriv hook for those who aren’t logged in. http://codex.wordpress.org/AJAX_in_Plugins#Ajax_on_the_Viewer-Facing_Side

Also the JS variable ajaxurl is only set on the backend. You will need to define that yourself on the front-end.

Let me know if you have any questions.

Leave a Comment