function save_details( $post_id ){
if ( wp_is_post_revision( $post_id ) )
$post_id = wp_is_post_revision( $post_id );
update_post_meta( $post_id, "testimonyname", $_POST["testimonyname"] );
}
add_action('save_post', 'save_details', 10, 1);
I have a custom post type with a custom field, but after adding several i noticed that the data in the custom field was missing from some previous entries.
I filled them in again and it looked fine.
Then i clicked the Add New button just once and 1 of my posts has it's custom meta data deleted.
However, it doesn't happen every time i click Add New.
I have tried this solution but to no avail
if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE )
Any help would be much appreciated, Thanks, Ashley