Documentary Post Type
Basic configuration of a custom post type for publishing documentary information
if ( ! function_exists('documentary_post_type') ) { // Register Custom Post Type function documentary_post_type() { $labels = array( 'name' => _x( 'Documentaries', 'Post Type General Name', 'illes' ), 'singular_name' => _x( 'Documentary', 'Post Type Singular Name', 'illes' ), 'menu_name' => __( 'Documentary', 'illes' ), 'parent_item_colon' => __( 'Parent Item:', 'illes' ), 'all_items' => __( 'All documentaries', 'illes' ), 'view_item' => __( 'View Documentary', 'illes' ), 'add_new_item' => __( 'Add New Documentary', 'illes' ), 'add_new' => __( 'Add New', 'illes' ), 'edit_item' => __( 'Edit Documentary', 'illes' ), 'update_item' => __( 'Update Documentary', 'illes' ), 'search_items' => __( 'Search Documentary', 'illes' ), 'not_found' => __( 'Not found', 'illes' ), 'not_found_in_trash' => __( 'Not found in Trash', 'illes' ), ); $args = array( 'label' => __( 'documentary', 'illes' ), 'description' => __( 'Fitxa tècnica amb conjunt de fragments annexes', 'illes' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'custom-fields', ), 'taxonomies' => array( 'category', 'post_tag', 'documentary' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => false, 'show_in_admin_bar' => false, 'menu_position' => 5, 'can_export' => true, 'has_archive' => false, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', ); register_post_type( 'documentary', $args ); } // Hook into the 'init' action add_action( 'init', 'documentary_post_type', 0 ); }