Teams
// Register Custom Post Type
function sp_team() {
$labels = array(
'name' => 'Teams',
'singular_name' => 'Team',
'menu_name' => 'Teams',
'name_admin_bar' => 'Teams',
'archives' => 'Team Archives',
'parent_item_colon' => 'Parent Team:',
'all_items' => 'All Teams',
'add_new_item' => 'Add New Team',
'add_new' => 'Add Team',
'new_item' => 'New Team',
'edit_item' => 'Edit Team',
'update_item' => 'Update Team',
'view_item' => 'View Team',
'search_items' => 'Search Team',
'not_found' => 'Not found',
'not_found_in_trash' => 'Not found in Trash',
'featured_image' => 'Team Logo',
'set_featured_image' => 'Set Team Logo',
'remove_featured_image' => 'Remove Team Logo',
'use_featured_image' => 'Use as Team Logo',
'insert_into_item' => 'Insert into Team',
'uploaded_to_this_item' => 'Uploaded to this Team',
'items_list' => 'Team list',
'items_list_navigation' => 'Team list navigation',
'filter_items_list' => 'Filter Team list',
);
$rewrite = array(
'slug' => 'sp_team',
'with_front' => true,
'pages' => true,
'feeds' => false,
);
$args = array(
'label' => 'Team',
'description' => 'Post Type Description',
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', ),
'taxonomies' => array( 'category', 'post_tag', 'sp_venue' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 20,
'menu_icon' => 'dashicons-groups',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'page',
);
register_post_type( 'sp_team', $args );
}
add_action( 'init', 'sp_team', 0 );