I have created a new post type called 'produkty'. It works well, I can add new posts, so it's working properly. What I am trying to create is a front-end editor for single.php. To make it update a post I am using wp_update_post()
.
However it's not really updating the content at all.
if(isset($_POST['submit']) && isset($_POST['singleedit'])) {
$args = array('ID' => $post->ID, 'post_content' => $_POST['singleedit'], 'post_type' => 'produkty');
wp_update_post($args);
}
Both issets launch correctly and the values are also good. I have no idea why nothing gets updated. Could anybody help me with it?