I have an external script I wrote (for admins only) that loads in the following at the top:
I'm aware that it can be a plugin, but it's just not right now.. it's just a standard php script.
Inside this script I have a form where it allows the person viewing to update a title.
Here is my code when they submit the form:
$post_data = array( 'ID' => $_POST['post_id'], 'post_title' => $_POST['post_title'] ); wp_update_post($post_data);
wp_update_post() actually returns an ID, which makes me think its working, but the post simply doesn't change, and the title never updates.
What might I be missing here? At the very least I would expect an error if it doesn't work.
I'm positive the ID and the Title are correct/filled in.