Go List Region Post Type
// Register Custom Post Type
function fgl_region_post_type() {
$labels = array(
'name' => _x( 'Go List Regions', 'Post Type General Name', 'fodors' ),
'singular_name' => _x( 'Go List Region', 'Post Type Singular Name', 'fodors' ),
'menu_name' => __( 'Go List', 'fodors' ),
'name_admin_bar' => __( 'Go List Region', 'fodors' ),
'archives' => __( 'Past Go List Posts', 'fodors' ),
'attributes' => __( 'Go List Region Attributes', 'fodors' ),
'parent_item_colon' => __( 'Parent Region:', 'fodors' ),
'all_items' => __( 'All Go List Regions', 'fodors' ),
'add_new_item' => __( 'Add New Go List Region', 'fodors' ),
'add_new' => __( 'Add New Go List Region', 'fodors' ),
'new_item' => __( 'New Go List Region', 'fodors' ),
'edit_item' => __( 'Edit Go List Region', 'fodors' ),
'update_item' => __( 'Update Region', 'fodors' ),
'view_item' => __( 'View Region', 'fodors' ),
'view_items' => __( 'View Go List Regions', 'fodors' ),
'search_items' => __( 'Search Region', 'fodors' ),
'not_found' => __( 'Go List Region Not found', 'fodors' ),
'not_found_in_trash' => __( 'Go List Region Not found in Trash', 'fodors' ),
'featured_image' => __( 'Region Hero Image', 'fodors' ),
'set_featured_image' => __( 'Set Region Hero image', 'fodors' ),
'remove_featured_image' => __( 'Remove Region Hero image', 'fodors' ),
'use_featured_image' => __( 'Use as Region Hero image', 'fodors' ),
'insert_into_item' => __( 'Insert into Region', 'fodors' ),
'uploaded_to_this_item' => __( 'Uploaded to this Region', 'fodors' ),
'items_list' => __( 'Go List Regions list', 'fodors' ),
'items_list_navigation' => __( 'Regions list navigation', 'fodors' ),
'filter_items_list' => __( 'Filter Go List Region list', 'fodors' ),
);
$args = array(
'label' => __( 'Go List Region', 'fodors' ),
'description' => __( 'A region in the Go List', 'fodors' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'custom-fields', 'page-attributes', 'post-formats' ),
'taxonomies' => array( 'fgl_year' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 10,
'menu_icon' => 'dashicons-calendar-alt',
'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' => 'post',
);
register_post_type( 'fgl_region', $args );
}
add_action( 'init', 'fgl_region_post_type', 0 );