Custom post type video
// Register Custom Post Type
function juno_video_post_type() {
$labels = array(
'name' => _x( 'Video', 'Post Type General Name', 'juno' ),
'singular_name' => _x( 'Video', 'Post Type Singular Name', 'juno' ),
'menu_name' => __( 'Video', 'juno' ),
'name_admin_bar' => __( 'Video', 'juno' ),
'archives' => __( 'Danh mục video', 'juno' ),
'attributes' => __( 'Thuộc tính video', 'juno' ),
'parent_item_colon' => __( 'Parent Item:', 'juno' ),
'all_items' => __( 'Tất cả video', 'juno' ),
'add_new_item' => __( 'Theo video mới', 'juno' ),
'add_new' => __( 'Thêm mới', 'juno' ),
'new_item' => __( 'Video mới', 'juno' ),
'edit_item' => __( 'Sửa video', 'juno' ),
'update_item' => __( 'Cập nhật video', 'juno' ),
'view_item' => __( 'Xem video', 'juno' ),
'view_items' => __( 'Xem tất cả video', 'juno' ),
'search_items' => __( 'Tìm kiếm video', 'juno' ),
'not_found' => __( 'Không tìm thấy video nào', 'juno' ),
'not_found_in_trash' => __( 'Không tìm thấy video nào', 'juno' ),
'featured_image' => __( 'Ảnh đại diện', 'juno' ),
'set_featured_image' => __( 'Cài đặt ảnh đại diện', 'juno' ),
'remove_featured_image' => __( 'Xóa ảnh đại diện', 'juno' ),
'use_featured_image' => __( 'Sử dụng như anh đại diện', 'juno' ),
'insert_into_item' => __( 'Chèn vào trong video', 'juno' ),
'uploaded_to_this_item' => __( 'Uploaded to this item', 'juno' ),
'items_list' => __( 'Danh sách video', 'juno' ),
'items_list_navigation' => __( 'Items list navigation', 'juno' ),
'filter_items_list' => __( 'Lọc video', 'juno' ),
);
$args = array(
'label' => __( 'Video', 'juno' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', ),
'taxonomies' => array( 'videos' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-format-video',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => true,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'video', $args );
}
add_action( 'init', 'juno_video_post_type', 0 );