Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Programs content

// Register Custom Post Type
function programcontent_post_type() {

	$labels = array(
		'name'                => _x( 'Program Content', 'Post Type General Name', 'interaction' ),
		'singular_name'       => _x( 'Programs Contents', 'Post Type Singular Name', 'interaction' ),
		'menu_name'           => __( 'Programs', 'interaction' ),
		'parent_item_colon'   => __( 'Parent Program Content:', 'interaction' ),
		'all_items'           => __( 'All Programs Contents', 'interaction' ),
		'view_item'           => __( 'View Program Content', 'interaction' ),
		'add_new_item'        => __( 'Add New Program Content', 'interaction' ),
		'add_new'             => __( 'Add New', 'interaction' ),
		'edit_item'           => __( 'Edit Program Content', 'interaction' ),
		'update_item'         => __( 'Update Program Content', 'interaction' ),
		'search_items'        => __( 'Search Program Content', 'interaction' ),
		'not_found'           => __( 'Not found', 'interaction' ),
		'not_found_in_trash'  => __( 'Not found in Trash', 'interaction' ),
	);
	$rewrite = array(
		'slug'                => 'programs-contents',
		'with_front'          => true,
		'pages'               => true,
		'feeds'               => false,
	);
	$args = array(
		'label'               => __( 'programcontent', 'interaction' ),
		'description'         => __( 'Content of a program', 'interaction' ),
		'labels'              => $labels,
		'supports'            => array( 'title', 'editor', 'excerpt', 'thumbnail', 'custom-fields', 'page-attributes', ),
		'taxonomies'          => array( 'program', 'step' ),
		'hierarchical'        => false,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'show_in_nav_menus'   => true,
		'show_in_admin_bar'   => true,
		'menu_position'       => 5,
		'menu_icon'           => 'dashicons-welcome-learn-more',
		'can_export'          => true,
		'has_archive'         => false,
		'exclude_from_search' => false,
		'publicly_queryable'  => true,
		'rewrite'             => $rewrite,
		'capability_type'     => 'page',
	);
	register_post_type( 'programcontent', $args );

}

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