答案 0 :(得分:0)
更改以下列出的值:
示例:强>
add_action('save_post_YOUR_POST_TYPE_NAME', 'some_function');
function some_function($post_id)
{
$slug = 'YOUR_POST_TYPE_NAME',
if ( $slug != $_POST['post_type'] ) {
return;
}
update_post_meta($post_id, 'YOUR_CUSTOM_FIELD_NAME', '');
}