I am working on a theme which contains a custom post type with custom fields.
Everything is working perfectly except the when a new custom post is added, the custom fields for the first custom post and first one only are wiped.
function save_details(){
global $post;
update_post_meta($post->ID, "testimonyname", $_POST["testimonyname"]);
}
add_action('save_post', 'save_details');
This is what i am using to save the custom field data
save_details
function? Or is it hooked into something? Do you mean you're using custom fields? Or did you create a custom meta box for your post type?