Contributor
// Register Custom Post Type
function contributor() {
$labels = array(
'name' => 'Contributors',
'singular_name' => 'Contributor',
'menu_name' => 'Contributor',
'parent_item_colon' => 'Parent Contributor:',
'all_items' => 'All Contributors',
'view_item' => 'View Contributor',
'add_new_item' => 'Add New Contributor',
'add_new' => 'Add New',
'edit_item' => 'Edit Contributor',
'update_item' => 'Update Contributor',
'search_items' => 'Search Contributor',
'not_found' => 'Not found',
'not_found_in_trash' => 'Not found in Trash',
);
$rewrite = array(
'slug' => 'autore',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => 'contributor',
'description' => 'Contributor for a Product (ONIX)',
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'trackbacks', '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' => 5,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'query_var' => 'contributor',
'rewrite' => $rewrite,
'capability_type' => 'post',
);
register_post_type( 'contributor', $args );
}
// Hook into the 'init' action
add_action( 'init', 'contributor', 0 );