KCAI Majors
// Register Custom Post Type
function kcai_majors() {
$labels = array(
'name' => 'Majors',
'singular_name' => 'Major',
'menu_name' => 'Majors',
'name_admin_bar' => 'Majors',
'parent_item_colon' => 'Parent Item:',
'all_items' => 'All Items',
'add_new_item' => 'Add New Item',
'add_new' => 'Add New',
'new_item' => 'New Item',
'edit_item' => 'Edit Item',
'update_item' => 'Update Item',
'view_item' => 'View Item',
'search_items' => 'Search Item',
'not_found' => 'Not found',
'not_found_in_trash' => 'Not found in Trash',
);
$rewrite = array(
'slug' => 'majors',
'with_front' => true,
'pages' => false,
'feeds' => false,
);
$args = array(
'label' => 'Major',
'description' => 'KCAI Majors',
'labels' => $labels,
'supports' => array( 'title', 'revisions', ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 20,
'menu_icon' => 'dashicons-welcome-learn-more',
'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( 'kcai_majors', $args );
}
add_action( 'init', 'kcai_majors', 0 );