Collections Custom Post Type
The Collections C.P.T. is meant to be used as a way to organize different types of information. This is used with the Information Type Taxonomy.
if ( ! function_exists('hms_custom_post_types') ) {
// Register Custom Post Type
function hms_custom_post_types() {
$labels = array(
'name' => _x( 'Collections', 'Post Type General Name', 'hms-custom-post-types' ),
'singular_name' => _x( 'Collection', 'Post Type Singular Name', 'hms-custom-post-types' ),
'menu_name' => __( 'Collections', 'hms-custom-post-types' ),
'name_admin_bar' => __( 'Post Type', 'hms-custom-post-types' ),
'archives' => __( 'Collection Archives', 'hms-custom-post-types' ),
'attributes' => __( 'Collection Attributes', 'hms-custom-post-types' ),
'parent_item_colon' => __( 'Parent Item:', 'hms-custom-post-types' ),
'all_items' => __( 'All Collections', 'hms-custom-post-types' ),
'add_new_item' => __( 'Add New Collection', 'hms-custom-post-types' ),
'add_new' => __( 'Add New Collection', 'hms-custom-post-types' ),
'new_item' => __( 'New Collection', 'hms-custom-post-types' ),
'edit_item' => __( 'Edit Collection', 'hms-custom-post-types' ),
'update_item' => __( 'Update Collection', 'hms-custom-post-types' ),
'view_item' => __( 'View Collection', 'hms-custom-post-types' ),
'view_items' => __( 'View Collections', 'hms-custom-post-types' ),
'search_items' => __( 'Search Collection', 'hms-custom-post-types' ),
'not_found' => __( 'Collections Not found', 'hms-custom-post-types' ),
'not_found_in_trash' => __( 'No Collections found in Trash', 'hms-custom-post-types' ),
'featured_image' => __( 'Featured Image', 'hms-custom-post-types' ),
'set_featured_image' => __( 'Set featured image', 'hms-custom-post-types' ),
'remove_featured_image' => __( 'Remove featured image', 'hms-custom-post-types' ),
'use_featured_image' => __( 'Use as featured image', 'hms-custom-post-types' ),
'insert_into_item' => __( 'Insert into Collection', 'hms-custom-post-types' ),
'uploaded_to_this_item' => __( 'Uploaded to this Collection', 'hms-custom-post-types' ),
'items_list' => __( 'Collections list', 'hms-custom-post-types' ),
'items_list_navigation' => __( 'Collection list navigation', 'hms-custom-post-types' ),
'filter_items_list' => __( 'Filter Collections list', 'hms-custom-post-types' ),
);
$args = array(
'label' => __( 'Collection', 'hms-custom-post-types' ),
'description' => __( 'Collections Description', 'hms-custom-post-types' ),
'labels' => $labels,
'supports' => array( ),
'taxonomies' => array( 'collections_type', '' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-book-alt',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'collections', $args );
}
add_action( 'init', 'hms_custom_post_types', 0 );
}