From 08f31b268d9776260fdf51b0f2d70eaa50cc4cf3 Mon Sep 17 00:00:00 2001 From: Monika Eftimova Date: Sun, 5 Oct 2014 03:32:43 +0300 Subject: [PATCH] Add custom post type for speakers --- functions.php | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index 67a35b5..93c0790 100644 --- a/functions.php +++ b/functions.php @@ -81,7 +81,7 @@ function create_sponsors_posttype() { $labels = array( 'name' => __( 'Sponsors' ), 'singular_name' => __( 'Sponsor' ), - 'menu_nam' => __( 'Sponsors'), + 'menu_name' => __( 'Sponsors'), 'all_items' => __( 'All Sponsors' ), 'view_item' => __( 'View Sponsor' ), 'add_new_item' => __( 'Add New Sponsor' ), @@ -118,6 +118,50 @@ function create_sponsors_posttype() { add_action( 'init', create_sponsors_posttype ); +# Create a custom post type for Speakers +function create_speakers_posttype() { + + $labels = array( + 'name' => __( 'Speakers' ), + 'singular_name' => __( 'Speaker' ), + 'menu_name' => __( 'Speakers'), + 'all_items' => __( 'All Speakers' ), + 'view_item' => __( 'View Speaker' ), + 'add_new_item' => __( 'Add New Speaker' ), + 'add_new' => __( 'Add New' ), + 'edit_item' => __( 'Edit Speaker' ), + 'update_item' => __( 'Update Speaker' ), + 'search_item' => __( 'Search Speaker' ), + 'not_found' => __( 'Not Found' ), + 'not_found_in_trash' => __( 'Not Found In Trash' ), + ); + + $args = array( + 'label' => __( 'speakers' ), + 'description' => __( 'Speakers on OpenFest' ), + 'labels' => $labels, + 'supports' => array( 'title', 'excerpt', 'thumbnail', 'custom-fields', ), + 'hierarchical' => false, + 'public' => true, + 'show_ui' => true, + 'show_in_menu' => true, + 'show_in_nav_menus' => true, + 'show_in_admin_bar' => true, + 'menu_position' => 6, + 'can_export' => true, + 'has_archive' => true, + 'exclude_from_search' => false, + 'publicly_queryable' => true, + 'capability_type' => 'post', + ); + + register_post_type( 'speakers', $args ); +} + +add_action( 'init', create_speakers_posttype ); + + + # Create a custom post type for Tranportation function transportation_posttype() {