Question

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

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top