Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Persoon – FV

// Register Custom Post Type
function persoon_post_type() {

	$labels = array(
		'name'                => _x( 'Personen', 'Post Type General Name', 'text_domain' ),
		'singular_name'       => _x( 'Persoon', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'           => __( 'Personen', 'text_domain' ),
		'parent_item_colon'   => __( '', 'text_domain' ),
		'all_items'           => __( 'Alle personen', 'text_domain' ),
		'view_item'           => __( 'Bekijk persoon', 'text_domain' ),
		'add_new_item'        => __( 'Voeg persoon toe', 'text_domain' ),
		'add_new'             => __( 'Voeg persoon toe', 'text_domain' ),
		'edit_item'           => __( 'Wijzig persoon', 'text_domain' ),
		'update_item'         => __( 'Bewaar persoon', 'text_domain' ),
		'search_items'        => __( 'Zoek in personen', 'text_domain' ),
		'not_found'           => __( 'Niet gevonden', 'text_domain' ),
		'not_found_in_trash'  => __( 'Niet gevonden in de prullebak', 'text_domain' ),
	);
	$rewrite = array(
		'slug'                => 'persoon',
		'with_front'          => true,
		'pages'               => true,
		'feeds'               => false,
	);
	$args = array(
		'label'               => __( 'persoon', 'text_domain' ),
		'description'         => __( 'Profile van persoon', 'text_domain' ),
		'labels'              => $labels,
		'supports'            => array( ),
		'hierarchical'        => false,
		'public'              => false,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'show_in_nav_menus'   => true,
		'show_in_admin_bar'   => true,
		'menu_position'       => 10,
		'menu_icon'           => 'dashicons-admin-users',
		'can_export'          => true,
		'has_archive'         => true,
		'exclude_from_search' => true,
		'publicly_queryable'  => true,
		'rewrite'             => $rewrite,
		'capability_type'     => 'post',
	);
	register_post_type( 'persoon', $args );

}

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