Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Entrant post type

// Register Custom Post Type
function entrant_post_type() {

	$labels = array(
		'name'                  => _x( 'Entrants', 'Post Type General Name', 'text_domain' ),
		'singular_name'         => _x( 'Entrant', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'             => __( 'Entrants', 'text_domain' ),
		'name_admin_bar'        => __( 'Entrant', 'text_domain' ),
		'archives'              => __( 'Entrant Archives', 'text_domain' ),
		'attributes'            => __( 'Entrant Attributes', 'text_domain' ),
		'parent_item_colon'     => __( 'Parent Item:', 'text_domain' ),
		'all_items'             => __( 'All Entrants', 'text_domain' ),
		'add_new_item'          => __( 'Add New Entrant', 'text_domain' ),
		'add_new'               => __( 'Add New Entrant', 'text_domain' ),
		'new_item'              => __( 'New Entrant', 'text_domain' ),
		'edit_item'             => __( 'Edit Entrant', 'text_domain' ),
		'update_item'           => __( 'Update Entrant', 'text_domain' ),
		'view_item'             => __( 'View Entrant', 'text_domain' ),
		'view_items'            => __( 'View Entrants', 'text_domain' ),
		'search_items'          => __( 'Search Entrants', 'text_domain' ),
		'not_found'             => __( 'Entrant Not found', 'text_domain' ),
		'not_found_in_trash'    => __( 'Not found in Trash', 'text_domain' ),
		'featured_image'        => __( 'Entrant Image', 'text_domain' ),
		'set_featured_image'    => __( 'Set Entrant featured image', 'text_domain' ),
		'remove_featured_image' => __( 'Remove Entrant featured image', 'text_domain' ),
		'use_featured_image'    => __( 'Use as Entrant featured image', 'text_domain' ),
		'insert_into_item'      => __( 'Insert into Entrant', 'text_domain' ),
		'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),
		'items_list'            => __( 'Entrant list', 'text_domain' ),
		'items_list_navigation' => __( 'Entrant list navigation', 'text_domain' ),
		'filter_items_list'     => __( 'Filter Entrant list', 'text_domain' ),
	);
	$rewrite = array(
		'slug'                  => 'entrant',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$args = array(
		'label'                 => __( 'Entrant', 'text_domain' ),
		'description'           => __( 'Entrant Post Type', 'text_domain' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'excerpt', 'thumbnail', 'comments', 'custom-fields', 'page-attributes', ),
		'taxonomies'            => array( 'category', 'post_tag' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-groups',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => 'entrant',
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'rewrite'               => $rewrite,
		'capability_type'       => 'page',
		'show_in_rest'          => true,
	);
	register_post_type( 'entrant_post_type', $args );

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