Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Seminar Custom Post Type

// Register Custom Post Type
function dt_seminars_cpt() {

	$labels = array(
		'name'                => 'Seminars',
		'singular_name'       => 'Seminar',
		'menu_name'           => 'Seminars',
		'parent_item_colon'   => 'Parent Seminar',
		'all_items'           => 'All Seminar',
		'view_item'           => 'View Seminar',
		'add_new_item'        => 'Add New Seminar',
		'add_new'             => 'Add New',
		'edit_item'           => 'Edit Seminar',
		'update_item'         => 'Update Seminar',
		'search_items'        => 'Search Seminars',
		'not_found'           => 'Not found',
		'not_found_in_trash'  => 'Not found in Trash',
	);
	$rewrite = array(
		'slug'                => 'seminars',
		'with_front'          => true,
		'pages'               => true,
		'feeds'               => true,
	);
	$args = array(
		'label'               => 'dt_seminars',
		'description'         => 'Dominic Tay Seminars',
		'labels'              => $labels,
		'supports'            => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', 'page-attributes', ),
		'taxonomies'          => array( 'category', ' post_tag' ),
		'hierarchical'        => true,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'show_in_nav_menus'   => true,
		'show_in_admin_bar'   => true,
		'menu_position'       => 20,
		'can_export'          => true,
		'has_archive'         => true,
		'exclude_from_search' => false,
		'publicly_queryable'  => true,
		'rewrite'             => $rewrite,
		'capability_type'     => 'post',
	);
	register_post_type( 'dt_seminars', $args );

}

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