我有一个卡住,让我很头痛,因为你看到的图片,这是我的结果,当我添加选项的事件。添加选项的事件(WordPress的)
我更新代码:wp-content/theme/mytheme/lib/metabox/function.php
$meta_boxes[] = array(
'id' => 'event_date_option',
'title' => __('Event options', 'mytheme'),
'pages' => array(Custom_Posts_Type_Event::POST_TYPE), // Post type
'context' => 'normal',
'priority' => 'high',
'show_names' => true, // Show field names on the left
'fields' => array(
array(
'name' => __('Event type:', 'mytheme'),
'desc' => __('Choose event type', 'mytheme'),
'id' => SHORTNAME . Widget_Event::EVENT_INTERVAL_META_KEY,
'type' => 'select',
'options' => array(
array('value'=>"n" , 'name' => __('Normal', 'mytheme')),
array('value'=>"c" , 'name' => __('Comunity', 'mytheme')),
),
),
这是展现在事件后,但我不知道如何保存时,添加新的事件或当我更新事件帖子。请帮助我,谢谢!