Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

De Jong Techniek Catalogus

// Register Custom Post Type
function custom_post_type_catalogus() {

	$labels = array(
		'name'                  => _x( 'Producten', 'Post Type General Name', 'text_domain' ),
		'singular_name'         => _x( 'Product', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'             => __( 'Catalogus', 'text_domain' ),
		'name_admin_bar'        => __( 'Catalogus', 'text_domain' ),
		'archives'              => __( 'Product Archieven', 'text_domain' ),
		'attributes'            => __( 'Product Attributen', 'text_domain' ),
		'parent_item_colon'     => __( 'Bovenliggend Product', 'text_domain' ),
		'all_items'             => __( 'Alle Producten', 'text_domain' ),
		'add_new_item'          => __( 'Voeg nieuwe product toe', 'text_domain' ),
		'add_new'               => __( 'Product Toevoegen', 'text_domain' ),
		'new_item'              => __( 'Nieuw product', 'text_domain' ),
		'edit_item'             => __( 'Wijzig product', 'text_domain' ),
		'update_item'           => __( 'Update product', 'text_domain' ),
		'view_item'             => __( 'Bekijk product', 'text_domain' ),
		'view_items'            => __( 'Bekijk producten', 'text_domain' ),
		'search_items'          => __( 'Zoek product', 'text_domain' ),
		'not_found'             => __( 'Niet gevonden', 'text_domain' ),
		'not_found_in_trash'    => __( 'Niet gevonden in de prullenbak', 'text_domain' ),
		'featured_image'        => __( 'Uitgelichte afbeelding', 'text_domain' ),
		'set_featured_image'    => __( 'Kies uitgelichte afbeelding', 'text_domain' ),
		'remove_featured_image' => __( 'Verwijder uitgelichte afbeelding', 'text_domain' ),
		'use_featured_image'    => __( 'Gebruik als uitgelicht afbeelding', 'text_domain' ),
		'insert_into_item'      => __( 'Voeg in product', 'text_domain' ),
		'uploaded_to_this_item' => __( 'Geupload naar dit product', 'text_domain' ),
		'items_list'            => __( 'Producten lijst', 'text_domain' ),
		'items_list_navigation' => __( 'Producten lijst navigatie', 'text_domain' ),
		'filter_items_list'     => __( 'Filter producten lijst', 'text_domain' ),
	);
	$args = array(
		'label'                 => __( 'Product', 'text_domain' ),
		'description'           => __( 'Catalogus Producten', 'text_domain' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail' ),
		'taxonomies'            => array( 'category', 'post_tag' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-cart',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'post',
	);
	register_post_type( 'product', $args );

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