Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Producten CPT

NL-talig, berichten eigenschappen, geen taxonomieën, geen archieven.

if ( ! function_exists('wf_cpt_producten') ) {

// Register Custom Post Type
function wf_cpt_producten() {

	$labels = array(
		'name'                  => _x( 'Producten', 'Post Type General Name', 'bb-theme-child' ),
		'singular_name'         => _x( 'Product', 'Post Type Singular Name', 'bb-theme-child' ),
		'menu_name'             => __( 'Producten', 'bb-theme-child' ),
		'name_admin_bar'        => __( 'Product', 'bb-theme-child' ),
		'archives'              => __( 'Product archieven', 'bb-theme-child' ),
		'attributes'            => __( 'Product attributen', 'bb-theme-child' ),
		'parent_item_colon'     => __( 'Hoofd Product:', 'bb-theme-child' ),
		'all_items'             => __( 'Alle Producten', 'bb-theme-child' ),
		'add_new_item'          => __( 'Nieuw Product toevoegen', 'bb-theme-child' ),
		'add_new'               => __( 'Nieuwe toevoegen', 'bb-theme-child' ),
		'new_item'              => __( 'Nieuw Product', 'bb-theme-child' ),
		'edit_item'             => __( 'Product bewerken', 'bb-theme-child' ),
		'update_item'           => __( 'Product bijwerken', 'bb-theme-child' ),
		'view_item'             => __( 'Product bekijken', 'bb-theme-child' ),
		'view_items'            => __( 'Producten bekijken', 'bb-theme-child' ),
		'search_items'          => __( 'Product Zoeken', 'bb-theme-child' ),
		'not_found'             => __( 'Niet gevonden', 'bb-theme-child' ),
		'not_found_in_trash'    => __( 'Niet gevonden in de prullenbak', 'bb-theme-child' ),
		'featured_image'        => __( 'Uitgelichte afbeelding', 'bb-theme-child' ),
		'set_featured_image'    => __( 'Uitgelichte afbeelding instellen', 'bb-theme-child' ),
		'remove_featured_image' => __( 'Uitgelichte afbeelding verwijderen', 'bb-theme-child' ),
		'use_featured_image'    => __( 'Als Uitgelichte afbeelding gebruiken', 'bb-theme-child' ),
		'insert_into_item'      => __( 'Invoegen in Product', 'bb-theme-child' ),
		'uploaded_to_this_item' => __( 'Geüpload naar dit Product', 'bb-theme-child' ),
		'items_list'            => __( 'Producten lijst', 'bb-theme-child' ),
		'items_list_navigation' => __( 'Producten lijst navigatie', 'bb-theme-child' ),
		'filter_items_list'     => __( 'Filter Producten lijst', 'bb-theme-child' ),
	);
	$args = array(
		'label'                 => __( 'Product', 'bb-theme-child' ),
		'description'           => __( 'Producten', 'bb-theme-child' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'revisions' ),
		'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'           => false,
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'post',
		'show_in_rest'          => true,
	);
	register_post_type( 'product', $args );

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

}