Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Pigeon Post Type

Light Town Pigeons function to add pigeons to their respective races. And to redirect the user to go to the correct pigeon information

// Register Custom Post Type
function pigeon_post_type() {

	$labels = array(
		'name'                  => _x( 'pigeons', 'Post Type General Name', 'text_domain' ),
		'singular_name'         => _x( 'Pigeon', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'             => __( 'Pigeon Post Types', 'text_domain' ),
		'name_admin_bar'        => __( 'Pigeon Post Type', 'text_domain' ),
		'archives'              => __( 'Pigeon Item Archives', 'text_domain' ),
		'attributes'            => __( 'Pigeon Item Attributes', 'text_domain' ),
		'parent_item_colon'     => __( 'Parent Item:', 'text_domain' ),
		'all_items'             => __( 'All Pigeon Items', 'text_domain' ),
		'add_new_item'          => __( 'Add New Pigeon Item', 'text_domain' ),
		'add_new'               => __( 'Add New Pigeon', 'text_domain' ),
		'new_item'              => __( 'New Pigeon Item', 'text_domain' ),
		'edit_item'             => __( 'Edit Pigeon Item', 'text_domain' ),
		'update_item'           => __( 'Update Pigeon Item', 'text_domain' ),
		'view_item'             => __( 'View Pigeon Item', 'text_domain' ),
		'view_items'            => __( 'View Pigeon Items', 'text_domain' ),
		'search_items'          => __( 'Search Pigeon Item', 'text_domain' ),
		'not_found'             => __( 'Pigeon Item Not found', 'text_domain' ),
		'not_found_in_trash'    => __( 'Pigeon Item Not found in Trash', 'text_domain' ),
		'featured_image'        => __( 'Featured Pigeon Image', 'text_domain' ),
		'set_featured_image'    => __( 'Set featured Pigeon image', 'text_domain' ),
		'remove_featured_image' => __( 'Remove featured Pigeon image', 'text_domain' ),
		'use_featured_image'    => __( 'Use as featured image', 'text_domain' ),
		'insert_into_item'      => __( 'Insert into Pigeon item', 'text_domain' ),
		'uploaded_to_this_item' => __( 'Uploaded Pigeon Post to this item', 'text_domain' ),
		'items_list'            => __( 'Pigeons(items) list', 'text_domain' ),
		'items_list_navigation' => __( 'Pigeons(items) list navigation', 'text_domain' ),
		'filter_items_list'     => __( 'Filter pigeons(items) list', 'text_domain' ),
	);
	$args = array(
		'label'                 => __( 'Pigeon', 'text_domain' ),
		'description'           => __( 'Post type to posts pigeons to their respective races', 'text_domain' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'custom-fields', ),
		'taxonomies'            => array( 'category', 'post_tag', 'animals', 'birds' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 10,
		'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( 'pigeon_post_type', $args );

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