给post添加meta_box保存不了
add_filter('wpjam_post_options', 'add_post_image_meta_box');
function add_post_image_meta_box($meta_box){
$meta_box['author-avatar-image-for-post'] = array(
'title' => 'images-avatar',
'post_type' => 'post',
'fields' => 'author-avatar-image-for-post',
'callback' => 'author_avatar_image_for_post'
);
return $meta_box;
}
function author_avatar_image_for_post($post){
$url = get_post_meta($post->ID,'author-avatar-image-for-post', true);
5条回复
我要回复
暂时不支持网页回复,请安装