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' ), 'name_admin_bar' => __( 'Post Type', 'illes' ), 'archives' => __( 'Item Archives', 'illes' ), 'attributes' => __( 'Item Attributes', 'illes' ), 'parent_item_colon' => __( 'Parent Item:', 'illes' ), 'all_items' => __( 'All documentaries', 'illes' ), 'add_new_item' => __( 'Add New Documentary', 'illes' ), 'add_new' => __( 'Add New', 'illes' ), 'new_item' => __( 'New Item', 'illes' ), 'edit_item' => __( 'Edit Documentary', 'illes' ), 'update_item' => __( 'Update Documentary', 'illes' ), 'view_item' => __( 'View Documentary', 'illes' ), 'view_items' => __( 'View Items', 'illes' ), 'search_items' => __( 'Search Documentary', 'illes' ), 'not_found' => __( 'Not found', 'illes' ), 'not_found_in_trash' => __( 'Not found in Trash', 'illes' ), 'featured_image' => __( 'Featured Image', 'illes' ), 'set_featured_image' => __( 'Set featured image', 'illes' ), 'remove_featured_image' => __( 'Remove featured image', 'illes' ), 'use_featured_image' => __( 'Use as featured image', 'illes' ), 'insert_into_item' => __( 'Insert into item', 'illes' ), 'uploaded_to_this_item' => __( 'Uploaded to this item', 'illes' ), 'items_list' => __( 'Items list', 'illes' ), 'items_list_navigation' => __( 'Items list navigation', 'illes' ), 'filter_items_list' => __( 'Filter items list', '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, 'menu_position' => 5, 'show_in_admin_bar' => false, 'show_in_nav_menus' => false, 'can_export' => true, 'has_archive' => false, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', ); register_post_type( 'documentary', $args ); } add_action( 'init', 'documentary_post_type', 0 ); }