Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Scene Post Type

Used in relation with Documentary Post Type to contain each of the multiple fragents of each documentary film

if ( ! function_exists('scene_post_type') ) {

// Register Custom Post Type
function scene_post_type() {

	$labels = array(
		'name'                => _x( 'Scenes', 'Post Type General Name', 'illes' ),
		'singular_name'       => _x( 'Scene', 'Post Type Singular Name', 'illes' ),
		'menu_name'           => __( 'Scene', 'illes' ),
		'parent_item_colon'   => __( 'Parent Item:', 'illes' ),
		'all_items'           => __( 'All Scenes', 'illes' ),
		'view_item'           => __( 'View Scene', 'illes' ),
		'add_new_item'        => __( 'Add New Scene', 'illes' ),
		'add_new'             => __( 'Add New', 'illes' ),
		'edit_item'           => __( 'Edit Scene', 'illes' ),
		'update_item'         => __( 'Update Scene', 'illes' ),
		'search_items'        => __( 'Search Scene', 'illes' ),
		'not_found'           => __( 'Not found', 'illes' ),
		'not_found_in_trash'  => __( 'Not found in Trash', 'illes' ),
	);
	$args = array(
		'label'               => __( 'scene', 'illes' ),
		'description'         => __( 'Each fragment of a documentary piece', 'illes' ),
		'labels'              => $labels,
		'supports'            => array( 'title', 'editor', 'author', '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( 'scene', $args );

}

// Hook into the 'init' action
add_action( 'init', 'scene_post_type', 0 );

}