这是我的自定义类型邮编。我想在那里添加元框。。。
function events_cust(){
$label = array(
\'name\' => _x(\'Events\'),
\'singular_name\' => _x(\'events\'),
\'menu_name\' => __(\'Events\'),
\'add_new\' => __(\'Add Event\'),
\'add_new_item\' => __ (\'Add New Event\'),
\'all_item\' => __(\'All Event\'),
\'edit_item\' => __(\'Edit Event\'),
\'new_item\' => __(\'New Event\'),
\'view_item\' => __(\'View Event\'),
\'update_item\' => __(\'update Event\'),
\'search_item\' => __(\'Search Event\')
);
$attr = array(
\'label\' => __(\'Events\'),
\'description\' => __(\'Event\'),
\'labels\' => $label,
\'supports\' => array(\'title\',\'editor\',\'thumbnail\'),
\'taxonomies\' => array(\'genres\'),
\'hiecrarhical\' => false,
\'public\' => true,
\'show_ui\' => true,
\'show_in_menu\' => true,
\'show_in_adim_bar\' => true,
\'menu_position\' => 5,
\'can_export\' => true,
\'has_archive\' => true,
\'exclude_from_search\' => false,
\'publicly_queryable\' => true,
\'capability_type\' => \'post\',
);
register_post_type(\'events-lists\',$attr);
}
add_action( \'init\', \'events_cust\', 0 );
add_action(\'add_meta_boxes\',\'create_events_metaboxes\');
function create_events_metaboxes(){
add_meta_box(\'events-meta-box\',\'Events Details\',\'show_events_metaboxes\',\'events-lists\',\'normal\',\'hight\');
}
function show_events_metaboxes(){
echo \'Hello Meta box\';
}
我们怎么了。