Events Post Type
Originally used on red templates
// Register Custom Post Type function create_events_posttype() { $labels = array( 'name' => 'Events', 'singular_name' => 'Event', 'menu_name' => 'Events', 'name_admin_bar' => 'Events', 'parent_item_colon' => 'Parent Events:', 'all_items' => 'All Events', 'add_new_item' => 'Add New Event', 'add_new' => 'Add Event', 'new_item' => 'New Event', 'edit_item' => 'Edit Event', 'update_item' => 'Update Event', 'view_item' => 'View Event', 'search_items' => 'Search Events', 'not_found' => 'Not found', 'not_found_in_trash' => 'Not found in Trash', ); $args = array( 'label' => 'events', 'description' => 'Events post type', 'labels' => $labels, 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, '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' => 'post', ); register_post_type( 'events', $args ); } // Hook into the 'init' action add_action( 'init', 'create_events_posttype', 0 );