0
add_action('init', 'create_services_box');
function create_services_box() {
register_post_type('Services',
array(
'labels' => array(
'name' => 'Services',
'singular_name' => 'Service',
),
'public' => true,
'menu_position' => 15,
'supports' => array('comments', 'thumbnail',),
'taxonomies' => array(''),
'has_archive' => true
)
);
}
add_filter('rwmb_meta_boxes', 'services_meta_boxes');
function services_meta_boxes($meta_boxes2) {
$meta_boxes2[] = array(
'title' => __('Service Metabox ', 'textdomain'),
'post_types' => array('Services'),
'fields' => array(
array(
'id' => 'Service_box_title',
'name' => __('Title :-', 'textdomain'),
'type' => 'text',
),
array(
'name' => __('Image Advanced Upload', 'textdomain'),
'id' => "service_img",
'type' => 'image_advanced',
'max_file_uploads' => 1,
),
),
);
return $meta_boxes2;
}
カスタムポストタイプ - >サービスを作成し、META BOXプラグインを使用しましたが、適切な出力が得られませんでした更新後に保存されていません、エラーが何であるか教えてください私はカスタムポストタイプを使用し、カスタムポストタイプでメタボックスを使用しています