Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Lesaanbod

if ( ! function_exists('custom_post_type_lesaanbod') ) {

// Register Custom Post Type
function custom_post_type_lesaanbod() {

	$labels = array(
		'name'                  => _x( 'Lessen', 'Post Type General Name', 'kunstcircuit' ),
		'singular_name'         => _x( 'Les', 'Post Type Singular Name', 'kunstcircuit' ),
		'menu_name'             => __( 'Lesaanbod', 'kunstcircuit' ),
		'name_admin_bar'        => __( 'Lesaanbod', 'kunstcircuit' ),
		'archives'              => __( 'Lesaanbod archief', 'kunstcircuit' ),
		'attributes'            => __( 'Eigenschappen', 'kunstcircuit' ),
		'parent_item_colon'     => __( 'Hoofd les', 'kunstcircuit' ),
		'all_items'             => __( 'Alle lessen', 'kunstcircuit' ),
		'add_new_item'          => __( 'Voeg nieuwe les toe', 'kunstcircuit' ),
		'add_new'               => __( 'Voeg les toe', 'kunstcircuit' ),
		'new_item'              => __( 'Nieuwe les', 'kunstcircuit' ),
		'edit_item'             => __( 'Bewerk les', 'kunstcircuit' ),
		'update_item'           => __( 'les bijwerken', 'kunstcircuit' ),
		'view_item'             => __( 'Bekijk les', 'kunstcircuit' ),
		'view_items'            => __( 'Bekijk lessen', 'kunstcircuit' ),
		'search_items'          => __( 'Zoek lessen', 'kunstcircuit' ),
		'not_found'             => __( 'Niet gevonden', 'kunstcircuit' ),
		'not_found_in_trash'    => __( 'Niet gevonden in prullenbak', 'kunstcircuit' ),
		'featured_image'        => __( 'Uitgelichte afbeelding', 'kunstcircuit' ),
		'set_featured_image'    => __( 'Stel uitgelichte afbeelding in', 'kunstcircuit' ),
		'remove_featured_image' => __( 'Verwijder uitgelichte afbeelding', 'kunstcircuit' ),
		'use_featured_image'    => __( 'Gebruik als uitgelichte afbeelding', 'kunstcircuit' ),
		'insert_into_item'      => __( 'Voeg toe in les', 'kunstcircuit' ),
		'uploaded_to_this_item' => __( 'Geüpload naar deze les', 'kunstcircuit' ),
		'items_list'            => __( 'Lijst lessen', 'kunstcircuit' ),
		'items_list_navigation' => __( 'Lijst lessen navigatie', 'kunstcircuit' ),
		'filter_items_list'     => __( 'Filter lijst lessen', 'kunstcircuit' ),
	);
	$rewrite = array(
		'slug'                  => 'les',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$args = array(
		'label'                 => __( 'Les', 'kunstcircuit' ),
		'description'           => __( 'Lesaanbod', 'kunstcircuit' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'comments', 'page-attributes' ),
		'taxonomies'            => array( 'programma', 'school', 'aantal', 'doelgroep', 'tijdsbesteding' ),
		'hierarchical'          => true,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-welcome-learn-more',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => 'lesaanbod',
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'rewrite'               => $rewrite,
		'capability_type'       => 'page',
	);
	register_post_type( 'les', $args );

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

}