Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Bands

if ( ! function_exists('Bands') ) {

// Register Custom Post Type
function Bands() {

	$labels = array(
		'name'                  => _x( 'Bands', 'Post Type General Name', 'bands' ),
		'singular_name'         => _x( 'Band', 'Post Type Singular Name', 'bands' ),
		'menu_name'             => __( 'Band Types', 'bands' ),
		'name_admin_bar'        => __( 'Band Type', 'bands' ),
		'archives'              => __( 'Band Archives', 'bands' ),
		'attributes'            => __( 'Band Attributes', 'bands' ),
		'parent_item_colon'     => __( 'Parent Band:', 'bands' ),
		'all_items'             => __( 'All Bands', 'bands' ),
		'add_new_item'          => __( 'Add New Band', 'bands' ),
		'add_new'               => __( 'Add New', 'bands' ),
		'new_item'              => __( 'New Band', 'bands' ),
		'edit_item'             => __( 'Edit Band', 'bands' ),
		'update_item'           => __( 'Update Band', 'bands' ),
		'view_item'             => __( 'View Band', 'bands' ),
		'view_items'            => __( 'View Bands', 'bands' ),
		'search_items'          => __( 'Search Band', 'bands' ),
		'not_found'             => __( 'Not found', 'bands' ),
		'not_found_in_trash'    => __( 'Not found in Trash', 'bands' ),
		'featured_image'        => __( 'Featured Image', 'bands' ),
		'set_featured_image'    => __( 'Set featured image', 'bands' ),
		'remove_featured_image' => __( 'Remove featured image', 'bands' ),
		'use_featured_image'    => __( 'Use as featured image', 'bands' ),
		'insert_into_item'      => __( 'Insert into Band', 'bands' ),
		'uploaded_to_this_item' => __( 'Uploaded to this Band', 'bands' ),
		'items_list'            => __( 'Bands list', 'bands' ),
		'items_list_navigation' => __( 'Bands list navigation', 'bands' ),
		'filter_items_list'     => __( 'Filter Bands list', 'bands' ),
	);
	$args = array(
		'label'                 => __( 'Band', 'bands' ),
		'description'           => __( 'Bands', 'bands' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'revisions', 'page-attributes' ),
		'taxonomies'            => array( 'event_type', ' styles' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 10,
		'menu_icon'             => 'dashicons-format-audio',
		'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',
		'show_in_rest'          => true,
	);
	register_post_type( 'Bands', $args );

}
add_action( 'init', 'Bands', 0 );

}