1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | <?php function my_custom_post_calendar() { $labels = array( 'name' => _x( 'Calendar Events', 'post type general name' ), 'singular_name' => _x( 'Calendar Event', 'post type singular name' ), 'add_new' => _x( 'Add New', 'book' ), 'add_new_item' => __( 'Add a New Calendar Event' ), 'edit_item' => __( 'Edit Calendar Event' ), 'new_item' => __( 'New Calendar Event' ), 'all_items' => __( 'All Calendar Events' ), 'view_item' => __( 'View Calendar Event' ), 'search_items' => __( 'Search Calendar Events' ), 'not_found' => __( 'No Calendar Events found' ), 'not_found_in_trash' => __( 'No Calendar Events found in the Trash' ), 'parent_item_colon' => '', 'menu_name' => 'Calendar Events' ); $args = array( 'labels' => $labels, 'description' => 'Holds our calendar events', 'public' => true, 'menu_position' => 5, 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments' ), 'has_archive' => true, ); register_post_type( 'calendar_event', $args ); } add_action( 'init', 'my_custom_post_calendar' ); ?> |