I’m using the 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');
________second version after @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');`
I have a problem to add this class in register_post_type
. Does anybody know how to implement it?
Thanks.