Black Conferences Post Type
if ( ! function_exists('custom_post_type') ) {
// Register Custom Post Type
function custom_post_type() {
$labels = array(
'name' => _x( 'Conferences', 'Post Type General Name', 's34' ),
'singular_name' => _x( 'Conference', 'Post Type Singular Name', 's34' ),
'menu_name' => __( 'Conferences', 's34' ),
'name_admin_bar' => __( 'Conferences', 's34' ),
'archives' => __( 'Item Archives', 's34' ),
'attributes' => __( 'Item Attributes', 's34' ),
'parent_item_colon' => __( 'Parent Item:', 's34' ),
'all_items' => __( 'All Items', 's34' ),
'add_new_item' => __( 'Add New Item', 's34' ),
'add_new' => __( 'Add New', 's34' ),
'new_item' => __( 'New Item', 's34' ),
'edit_item' => __( 'Edit Item', 's34' ),
'update_item' => __( 'Update Item', 's34' ),
'view_item' => __( 'View Item', 's34' ),
'view_items' => __( 'View Items', 's34' ),
'search_items' => __( 'Search Item', 's34' ),
'not_found' => __( 'Not found', 's34' ),
'not_found_in_trash' => __( 'Not found in Trash', 's34' ),
'featured_image' => __( 'Featured Image', 's34' ),
'set_featured_image' => __( 'Set featured image', 's34' ),
'remove_featured_image' => __( 'Remove featured image', 's34' ),
'use_featured_image' => __( 'Use as featured image', 's34' ),
'insert_into_item' => __( 'Insert into item', 's34' ),
'uploaded_to_this_item' => __( 'Uploaded to this item', 's34' ),
'items_list' => __( 'Items list', 's34' ),
'items_list_navigation' => __( 'Items list navigation', 's34' ),
'filter_items_list' => __( 'Filter items list', 's34' ),
);
$rewrite = array(
'slug' => 'conference',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'Conference', 's34' ),
'description' => __( 'Conferences and Summits', 's34' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'revisions' ),
'taxonomies' => array( 'era' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'page',
'show_in_rest' => true,
);
register_post_type( 'conference', $args );
}
add_action( 'init', 'custom_post_type', 0 );
}