nwi_voting_proposal
// Register Custom Post Type
function proposal_post_type() {
$labels = array(
'name' => _x( 'Proposal', 'Post Type General Name', 'nwi-voting' ),
'singular_name' => _x( 'Proposal', 'Post Type Singular Name', 'nwi-voting' ),
'menu_name' => __( 'Proposals', 'nwi-voting' ),
'name_admin_bar' => __( 'Proposals', 'nwi-voting' ),
'archives' => __( 'Proposal Archives', 'nwi-voting' ),
'attributes' => __( 'Proposal Attributes', 'nwi-voting' ),
'parent_item_colon' => __( 'Parent Item:', 'nwi-voting' ),
'all_items' => __( 'All Proposals', 'nwi-voting' ),
'add_new_item' => __( 'Add New Proposal', 'nwi-voting' ),
'add_new' => __( 'Add New', 'nwi-voting' ),
'new_item' => __( 'New Proposal', 'nwi-voting' ),
'edit_item' => __( 'Edit Proposal', 'nwi-voting' ),
'update_item' => __( 'Update Proposal', 'nwi-voting' ),
'view_item' => __( 'View Proposal', 'nwi-voting' ),
'view_items' => __( 'View Proposals', 'nwi-voting' ),
'search_items' => __( 'Search Proposals', 'nwi-voting' ),
'not_found' => __( 'Not found', 'nwi-voting' ),
'not_found_in_trash' => __( 'Not found in Trash', 'nwi-voting' ),
'featured_image' => __( 'Featured Image', 'nwi-voting' ),
'set_featured_image' => __( 'Set featured image', 'nwi-voting' ),
'remove_featured_image' => __( 'Remove featured image', 'nwi-voting' ),
'use_featured_image' => __( 'Use as featured image', 'nwi-voting' ),
'insert_into_item' => __( 'Insert into Proposal', 'nwi-voting' ),
'uploaded_to_this_item' => __( 'Uploaded to this Proposals', 'nwi-voting' ),
'items_list' => __( 'Proposals list', 'nwi-voting' ),
'items_list_navigation' => __( 'Proposals list navigation', 'nwi-voting' ),
'filter_items_list' => __( 'Filter Proposals list', 'nwi-voting' ),
);
$args = array(
'label' => __( 'Proposal', 'nwi-voting' ),
'description' => __( 'Submitted Proposals for NWI', 'nwi-voting' ),
'labels' => $labels,
'supports' => array( 'title', 'revisions', 'custom-fields', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-analytics',
'show_in_admin_bar' => true,
'show_in_nav_menus' => false,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => true,
'publicly_queryable' => true,
'capability_type' => 'page',
'show_in_rest' => false,
);
register_post_type( 'nwi_proposal', $args );
}
add_action( 'init', 'proposal_post_type', 0 );