KBC – Ideas											
					
															
										
						
					
					
					// Register Custom Post Type
function kbc_idea_post_type() {
	$labels = array(
		'name'                => 'Ideas',
		'singular_name'       => 'Idea',
		'menu_name'           => 'Ideas',
		'parent_item_colon'   => '',
		'all_items'           => 'All Ideas',
		'view_item'           => 'View Idea',
		'add_new_item'        => 'Add New Idea',
		'add_new'             => 'Add New',
		'edit_item'           => 'Edit Idea',
		'update_item'         => 'Update Idea',
		'search_items'        => 'Search Ideas',
		'not_found'           => 'No idea found',
		'not_found_in_trash'  => 'No ideas found in Trash',
	);
	$rewrite = array(
		'slug'                => 'ideas-hub',
		'with_front'          => true,
		'pages'               => false,
		'feeds'               => false,
	);
	$capabilities = array(
		'edit_post'           => 'edit_idea',
		'read_post'           => 'read_idea',
		'delete_post'         => 'delete_idea',
		'edit_posts'          => 'edit_ideas',
		'edit_others_posts'   => 'edit_others_ideas',
		'publish_posts'       => 'publish_ideas',
		'read_private_posts'  => 'read_private_ideas',
	);
	$args = array(
		'label'               => 'idea',
		'description'         => 'Bright Ideas',
		'labels'              => $labels,
		'supports'            => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'revisions', ),
		'taxonomies'          => array( 'idea_category', ' idea_region' ),
		'hierarchical'        => false,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'show_in_nav_menus'   => true,
		'show_in_admin_bar'   => true,
		'menu_position'       => 20,
		'menu_icon'           => 'dashicons-lightbulb',
		'can_export'          => true,
		'has_archive'         => true,
		'exclude_from_search' => false,
		'publicly_queryable'  => true,
		'rewrite'             => $rewrite,
		'capabilities'        => $capabilities,
	);
	register_post_type( 'idea', $args );
}
// Hook into the 'init' action
add_action( 'init', 'kbc_idea_post_type', 0 );