Poll Item
// Register Custom Post Type
function custom_post_type() {
$labels = array(
'name' => _x( 'Poll Options', 'Post Type General Name', 'cedpoll' ),
'singular_name' => _x( 'Poll Option', 'Post Type Singular Name', 'cedpoll' ),
'menu_name' => __( 'Poll Options', 'cedpoll' ),
'name_admin_bar' => __( 'Poll Options', 'cedpoll' ),
'parent_item_colon' => __( 'Parent Poll Option:', 'cedpoll' ),
'all_items' => __( 'All Poll Options', 'cedpoll' ),
'add_new_item' => __( 'Add New Poll Item', 'cedpoll' ),
'add_new' => __( 'Add New', 'cedpoll' ),
'new_item' => __( 'New Option', 'cedpoll' ),
'edit_item' => __( 'Edit Poll Option', 'cedpoll' ),
'update_item' => __( 'Update Poll Option', 'cedpoll' ),
'view_item' => __( 'View Poll Option', 'cedpoll' ),
'search_items' => __( 'Search Poll Option', 'cedpoll' ),
'not_found' => __( 'Not found', 'cedpoll' ),
'not_found_in_trash' => __( 'Not found in Trash', 'cedpoll' ),
);
$args = array(
'label' => __( 'Poll Option', 'cedpoll' ),
'description' => __( 'Options users can select for a poll', 'cedpoll' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'comments', 'trackbacks', 'revisions', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 20,
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => 'poll/%poll%',
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
);
register_post_type( 'poll_option', $args );
}
add_action( 'init', 'custom_post_type', 0 );