The below code will add default custom fields to your post ( Insert the code in your themes function.php ) .
add_action('wp_insert_post', 'set_default_custom_fields');
function set_default_custom_fields($post_id){
if ( $_GET['post_type'] == 'post' ) {
add_post_meta($post_id, 'Field Name', '', true);
add_post_meta($post_id, 'Another Field Name', '', true);
}
return true;
}
By default this will add an empty custom field to your post. If you want to enter a value by default too, use the code below.
add_action('wp_insert_post', 'set_default_custom_fields');
function set_default_custom_fields($post_id){
if ( $_GET['post_type'] == 'post' ) {
add_post_meta($post_id, 'Field Name', 'Field Value', true);
}
return true;
}