I actually can show content and change content while displaying post. Problem is that I am using RSS importer and after importing I want to make search and replace and correct data imported because I know what is wrong with it.
<?php add_action('pmxi_saved_post', 'post_saved', 10, 1); $my_post = array( "ID" => $id, "post_content" => "1", ); wp_update_post( $my_post ); ?>
this is code I am using. Problem is that "post_content" does not change to value 1. Basically this code should change whatever is in post $id to value "1".
Why is this not working? I cannot figure it out for 2 hours now. All examples I have are based on change content while displaying but that does not change content IN database, only what is shown.