1
나는 나의 wordpress 사이트에서 Webinar를 필요로한다. 그래서 내 사용자 정의 게시 유형에 대한 메타 상자를 등록합니다. 나는 워드 프레스 관리 패널에서 나의 커스텀 포스트를 볼 수 있지만, 커스텀 포스트 메타 박스 안에는 빠져있다. 무엇이 잘못 되었습니까!wordpress metabox가 보이지 않는다
// Meta boxes
add_filter('rwmb_meta_boxes', 'navbig_webinars_register_meta_boxes');
//Register meta boxes
function navbig_webinars_register_meta_boxes($meta_boxes)
{
$prefix = 'navbig_webinars_';
$meta_boxes[] = array(
'id' => 'standard',
'title' => __('Webinar Data', 'rwmb'),
'pages' => array('webinar'),
'context' => 'normal',
'priority' => 'high',
'autosave' => true,
'fields' => array(
array(
'name' => __('Date of Webinar', 'rwmb'),
'id' => "webinar_date",
'type' => 'date',
// jQuery date picker options. See here http://api.jqueryui.com/datepicker
'js_options' => array(
'dateFormat' => __('dd-MM-yy', 'rwmb'),
'changeMonth' => true,
'changeYear' => true,
'showButtonPanel' => true,
),
),
array(
'name' => __('Location', 'rwmb'),
'id' => "webinar-location",
'type' => 'text',
'std' => __('Default text value', 'rwmb'),
),
array(
'name' => __('Time Of Webinar', 'rwmb'),
'id' => 'webinar_time',
'type' => 'time',
'js_options' => array(
'stepMinute' => 5,
'showSecond' => true,
'stepSecond' => 10,
),
),
array(
'name' => __('Select Time Zone', 'rwmb'),
'id' => "select-timezone",
'type' => 'select_advanced',
'options' => array(
'value1' => __('PST', 'rwmb'),
'value2' => __('EST', 'rwmb'),
),
'multiple' => false,
'placeholder' => __('Select an Coures Type', 'rwmb'),
),
// URL
array(
'name' => __('Webinar URL', 'rwmb'),
'id' => "webinar_url",
'type' => 'url',
'std' => 'http://google.com',
),
array(
'name' => __('Webinar Banner', 'rwmb'),
'id' => "webinar_banner",
'type' => 'thickbox_image',
),
),
);
return $meta_boxes;
}
대신 귀하의 게시물 유형 정의에 register_meta_box_cb을 사용하는 것이 좋습니다. – Max
'theme/plugin' 파일의 어디에서나'add_meta_box'를 사용 했습니까? –
@Akshay : 정말 고마워요! 나는 플러그인을 놓쳤다, 지금 잘 작동하고있어! – nanbatman