Tipe Konten Bantuan
// Register Custom Post Type
function bantuan() {
$labels = array(
'name' => _x( 'Bantuan', 'Post Type General Name', 'teksno' ),
'singular_name' => _x( 'Bantuan', 'Post Type Singular Name', 'teksno' ),
'menu_name' => __( 'Bantuan', 'teksno' ),
'name_admin_bar' => __( 'bantuan', 'teksno' ),
'archives' => __( 'Arsip Bantuan', 'teksno' ),
'parent_item_colon' => __( 'Induk Item Bantuan:', 'teksno' ),
'all_items' => __( 'Semua Item Bantuan', 'teksno' ),
'add_new_item' => __( 'Tambah Item Baru', 'teksno' ),
'add_new' => __( 'Tambah Baru', 'teksno' ),
'new_item' => __( 'Item Baru', 'teksno' ),
'edit_item' => __( 'Edit Item', 'teksno' ),
'update_item' => __( 'Perbarui Item', 'teksno' ),
'view_item' => __( 'Lihat Item', 'teksno' ),
'search_items' => __( 'Cari Item', 'teksno' ),
'not_found' => __( 'item tidak ditemukan', 'teksno' ),
'not_found_in_trash' => __( 'Item tidak ditemukan di tong sampah', 'teksno' ),
'featured_image' => __( 'Featured Image', 'teksno' ),
'set_featured_image' => __( 'Set featured image', 'teksno' ),
'remove_featured_image' => __( 'Hapus featured image', 'teksno' ),
'use_featured_image' => __( 'Gunakan sebagai featured image', 'teksno' ),
'insert_into_item' => __( 'Sisipkan ke dalam item', 'teksno' ),
'uploaded_to_this_item' => __( 'Diunggah ke dalam item ini', 'teksno' ),
'items_list' => __( 'Daftar item ', 'teksno' ),
'items_list_navigation' => __( 'Daftar navigasi item', 'teksno' ),
'filter_items_list' => __( 'Saring daftar item', 'teksno' ),
);
$rewrite = array(
'slug' => 'bantuan',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'Bantuan', 'teksno' ),
'description' => __( 'Item Bantuan', 'teksno' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'author', 'page-attributes', 'post-formats', ),
'taxonomies' => array( 'kategori_bantuan' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-groups',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'page',
);
register_post_type( 'bantuan', $args );
}
add_action( 'init', 'bantuan', 0 );