You need to replace the field name from name
to something else since name
is a reserved word and could be whats causing the blank page, also its better practice to prefix you field names.
Now in your save_details_booktime function make sure you are no the right post type and not in autosave, something like this:
function save_details_booktime($post_id ) {
global $post;
//skip auto save
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
return $post_id;
}
/check for you post type only
if( $post->post_type != "booktime" ) {
return;
}
$custom_meta_fields = array( 'name' ); //change from name to something else
foreach( $custom_meta_fields as $custom_meta_field ){
if(isset($_POST[$custom_meta_field]) && $_POST[$custom_meta_field] != ""){
update_post_meta($post_id, $custom_meta_field, $_POST[$custom_meta_field]);
}
}
}