Pitchfork Student Orgs
// Register Custom Post Type
function pitchfork_studentorgs_cpt() {
$labels = array(
'name' => _x( 'Student Org', 'Post Type General Name', 'pitchfork-studentorgs' ),
'singular_name' => _x( 'Student Org', 'Post Type Singular Name', 'pitchfork-studentorgs' ),
'menu_name' => __( 'Student Orgs', 'pitchfork-studentorgs' ),
'name_admin_bar' => __( 'Student Orgs', 'pitchfork-studentorgs' ),
'archives' => __( 'Student Org Archives', 'pitchfork-studentorgs' ),
'attributes' => __( 'Student Org Attributes', 'pitchfork-studentorgs' ),
'parent_item_colon' => __( 'Parent Student Org:', 'pitchfork-studentorgs' ),
'all_items' => __( 'All Student Orgs', 'pitchfork-studentorgs' ),
'add_new_item' => __( 'Add New Student Org', 'pitchfork-studentorgs' ),
'add_new' => __( 'Add New', 'pitchfork-studentorgs' ),
'new_item' => __( 'New Student Org', 'pitchfork-studentorgs' ),
'edit_item' => __( 'Edit Student Org', 'pitchfork-studentorgs' ),
'update_item' => __( 'Update Student Org', 'pitchfork-studentorgs' ),
'view_item' => __( 'View Student Org', 'pitchfork-studentorgs' ),
'view_items' => __( 'View Student Orgs', 'pitchfork-studentorgs' ),
'search_items' => __( 'Search Student Orgs', 'pitchfork-studentorgs' ),
'not_found' => __( 'Not found', 'pitchfork-studentorgs' ),
'not_found_in_trash' => __( 'Not found in Trash', 'pitchfork-studentorgs' ),
'featured_image' => __( 'Organization Image', 'pitchfork-studentorgs' ),
'set_featured_image' => __( 'Set organization image', 'pitchfork-studentorgs' ),
'remove_featured_image' => __( 'Remove image', 'pitchfork-studentorgs' ),
'use_featured_image' => __( 'Use as image', 'pitchfork-studentorgs' ),
'insert_into_item' => __( 'Insert into Student Org', 'pitchfork-studentorgs' ),
'uploaded_to_this_item' => __( 'Uploaded to this student org', 'pitchfork-studentorgs' ),
'items_list' => __( 'Student Orgs list', 'pitchfork-studentorgs' ),
'items_list_navigation' => __( 'Student Orgs navigation', 'pitchfork-studentorgs' ),
'filter_items_list' => __( 'Filter student orgs list', 'pitchfork-studentorgs' ),
);
$args = array(
'label' => __( 'Student Org', 'pitchfork-studentorgs' ),
'description' => __( 'A student organization', 'pitchfork-studentorgs' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'page-attributes' ),
'taxonomies' => array( 'studentorg-category' ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 20,
'menu_icon' => 'dashicons-admin-generic',
'show_in_admin_bar' => false,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
'show_in_rest' => true,
);
register_post_type( 'studentorg', $args );
}
add_action( 'init', 'pitchfork_studentorgs_cpt', 0 );