register_post_type添加一个自定义文章类型
register_post_type( 'movie_bt', array( 'public' => true, 'publicly_queryable' => true, 'hierarchical' => false, 'labels' => array( 'name' => _x('Movie BT', 'post type general name', 'mibt'), 'singular_name' => _x('Movie BT', 'post type singular name', 'mibt'), 'add_new' => _x('add BT', 'Movie BT', 'mibt'), 'add_new_item' => __('add BT', 'mibt'), 'edit_item' => __('Edit BT', 'mibt'), 'new_item' => __('New Movie BT', 'mibt'), 'view_item' => __('Preview Movie BT', 'mibt'), 'search_items' => __('Search Movie BT', 'mibt'), 'not_found' => __('You have not yet released movie BT', 'mibt'), 'not_found_in_trash' => __('There are no Movie BT Trash', 'mibt'), 'parent_item_colon' => '', ), 'show_ui' => true, 'menu_position' => 5, 'has_archive' => true, 'menu_icon' => get_bloginfo('template_url') . '/img/fo_tm.png', 'supports' => array( 'title', 'author', 'thumbnail', 'editor', 'comments', 'custom-fields', ), ) );
$post_type
字符串类型,必需的。
$args
数组或者字符串,可选的。
labels
数组或者字符串,可选的。
show_ui
menu_position
has_archive
menu_icon
菜单的图标
supports