Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

portal

// Register Custom Post Type
function add_kavels() {

	$labels = array(
		'name'                  => _x( 'Kavels', 'Post Type General Name', 'octopus' ),
		'singular_name'         => _x( 'Kavel', 'Post Type Singular Name', 'octopus' ),
		'menu_name'             => __( 'Kavels', 'octopus' ),
		'name_admin_bar'        => __( 'Kavel', 'octopus' ),
		'archives'              => __( 'Kavel overzicht', 'octopus' ),
		'attributes'            => __( 'Kavel attributen', 'octopus' ),
		'parent_item_colon'     => __( 'Overkoepelend:', 'octopus' ),
		'all_items'             => __( 'Alle kavels', 'octopus' ),
		'add_new_item'          => __( 'Nieuw kavel toevoegen', 'octopus' ),
		'add_new'               => __( 'Nieuwe toevoegen', 'octopus' ),
		'new_item'              => __( 'Nieuw kavel', 'octopus' ),
		'edit_item'             => __( 'Bewerk kavel', 'octopus' ),
		'update_item'           => __( 'Kavel bijwerken', 'octopus' ),
		'view_item'             => __( 'Toon kavel', 'octopus' ),
		'view_items'            => __( 'Toon kavels', 'octopus' ),
		'search_items'          => __( 'Zoek kavel', 'octopus' ),
		'not_found'             => __( 'Niet gevonden', 'octopus' ),
		'not_found_in_trash'    => __( 'Niet gevonden in prullenbak', 'octopus' ),
		'featured_image'        => __( 'Uitgelichte afbeelding', 'octopus' ),
		'set_featured_image'    => __( 'Stel uitgelichte afbeelding in', 'octopus' ),
		'remove_featured_image' => __( 'Verwijder uitgelichte afbeelding', 'octopus' ),
		'use_featured_image'    => __( 'Gebruik als uitgelichte afbeelding', 'octopus' ),
		'insert_into_item'      => __( 'Voeg bij kavel in', 'octopus' ),
		'uploaded_to_this_item' => __( 'Geüpload naar dit kavel', 'octopus' ),
		'items_list'            => __( 'Lijst met kavels', 'octopus' ),
		'items_list_navigation' => __( 'Kavellijstnavigatie', 'octopus' ),
		'filter_items_list'     => __( 'Filter kavel lijst', 'octopus' ),
	);
	$args = array(
		'label'                 => __( 'Kavel', 'octopus' ),
		'description'           => __( 'Online ruimtes voor leden van Octopusplan', 'octopus' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor' ),
		'taxonomies'            => array( 'niveau' ),
		'hierarchical'          => true,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-grid-view',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => false,
		'can_export'            => true,
		'has_archive'           => false,
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'page',
		'show_in_rest'          => false,
	);
	register_post_type( 'kavel', $args );

}
add_action( 'init', 'add_kavels', 0 );