我正在使用class My Metabox class
*-- Custom Post Init Begin --*/
function mypost_types(){
register_post_type(\'video\',
array(
$labels = array(
\'name\' => __( \'video\' ),
singular_name\' => __( \'video\'),
\'add_new_item\' =>__(\'Add New video\'),
\'edit_item\' => __(\'Edit video\'),
\'view_item\' => __(\'View video\')
),
\'labels\' => $labels,
\'public\' => true,
\'show_ui\' => true,
\'capability_type\' => \'post\',
\'supports\' => array(\'title\',\'editor\',\'excerpt\',\'thumbnail\',\'custom-fields\')
);
}
add_action(\'init\', \'mypost_types\');
__
______@kaiser comment后的第二个版本
/*-- Custom Post Init Begin --*/
`
function mypost_types(){
{
$labels = array(
\'name\' => __( \'video\' ),
\'singular_name\' => __( \'video\' ),
\'add_new_item\' =>__(\'Add New video\'),
\'edit_item\' => __(\'Edit video\'),
\'view_item\' => __(\'View video\')
);
$args = array(
\'labels\' => $labels,
\'public\' => true,
\'show_ui\' => true,
\'capability_type\' => \'post\',
\'supports\' => array(\'title\',\'editor\',\'excerpt\',\'thumbnail\',\'custom-fields\')
);
register_post_type(\'video\', $args);
}
add_action(\'init\', \'mypost_types\');`
我在添加此类时遇到问题
register_post_type
. 有人知道如何实施吗?
谢谢