lb custom post
lb custom post
if ( ! function_exists('register_voucher') ) { // Register Custom Post Type function register_voucher() { $labels = array( 'name' => _x( 'Voucher-voucher', 'Post Type General Name', 'text_domain' ), 'singular_name' => _x( 'Voucher', 'Post Type Singular Name', 'text_domain' ), 'menu_name' => __( 'Voucher', 'text_domain' ), 'name_admin_bar' => __( 'Voucher', 'text_domain' ), 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ), 'all_items' => __( 'Semua Voucher', 'text_domain' ), 'add_new_item' => __( 'Tambahkan Voucher Baru', 'text_domain' ), 'add_new' => __( 'Tambahkan Baru', 'text_domain' ), 'new_item' => __( 'Voucher Baru', 'text_domain' ), 'edit_item' => __( 'Edit Voucher', 'text_domain' ), 'update_item' => __( 'Update Voucher', 'text_domain' ), 'view_item' => __( 'Lihat Voucher', 'text_domain' ), 'search_items' => __( 'Cari Voucher', 'text_domain' ), 'not_found' => __( 'Tak ditemukan', 'text_domain' ), 'not_found_in_trash' => __( 'Tak ditemukan di Tong Sampah', 'text_domain' ), ); $args = array( 'label' => __( 'lb_voucher', 'text_domain' ), 'description' => __( 'Voucher gratis untuk pengunjung lamanbisnis.', 'text_domain' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', ), 'taxonomies' => array( 'kategori_voucher', ' tag_voucher' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 70, 'menu_icon' => 'dashicons-tickets', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'post', ); register_post_type( 'lb_voucher', $args ); } // Hook into the 'init' action add_action( 'init', 'register_voucher', 0 ); }