当然钩入save_post
操作,然后在保存时执行自定义查询,并将其存储为帖子的自定义字段。
add_action(\'save_post\', \'my_extra_meta_saver\');
function my_extra_meta_saver($post_id)
{
global $post;
// Prepare whatever extra information you want here
// Save each piece of info in a custom field
update_post_meta($post_id, \'meta_key\', \'meta_value\');
}