Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Vacatures CPT

if ( ! function_exists('wf_cpt_vacatures') ) {

// Register Custom Post Type
function wf_cpt_vacatures() {

	$labels = array(
		'name'                  => _x( 'Vacatures', 'Post Type General Name', 'bb-theme-child' ),
		'singular_name'         => _x( 'Vacature', 'Post Type Singular Name', 'bb-theme-child' ),
		'menu_name'             => __( 'Vacatures', 'bb-theme-child' ),
		'name_admin_bar'        => __( 'Vacature', 'bb-theme-child' ),
		'archives'              => __( 'Vacature archieven', 'bb-theme-child' ),
		'attributes'            => __( 'Vacature attributen', 'bb-theme-child' ),
		'parent_item_colon'     => __( 'Hoofd vacature:', 'bb-theme-child' ),
		'all_items'             => __( 'Alle vacatures', 'bb-theme-child' ),
		'add_new_item'          => __( 'Nieuwe vacature toevoegen', 'bb-theme-child' ),
		'add_new'               => __( 'Nieuwe toevoegen', 'bb-theme-child' ),
		'new_item'              => __( 'Nieuwe vacature', 'bb-theme-child' ),
		'edit_item'             => __( 'Bewerk vacature', 'bb-theme-child' ),
		'update_item'           => __( 'Vacature bijwerken', 'bb-theme-child' ),
		'view_item'             => __( 'Bekijk vacature', 'bb-theme-child' ),
		'view_items'            => __( 'Bekijk vacatures', 'bb-theme-child' ),
		'search_items'          => __( 'Zoek vacature', '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'    => __( 'Stel uitgelichte afbeelding in', 'bb-theme-child' ),
		'remove_featured_image' => __( 'Verwijder uitgelichte afbeelding', 'bb-theme-child' ),
		'use_featured_image'    => __( 'Gebruik als uitgelichte afbeelding', 'bb-theme-child' ),
		'insert_into_item'      => __( 'Voeg toe aan vacature', 'bb-theme-child' ),
		'uploaded_to_this_item' => __( 'Geüpload naar deze vacature', 'bb-theme-child' ),
		'items_list'            => __( 'Vacature lijst', 'bb-theme-child' ),
		'items_list_navigation' => __( 'Vacatures lijst navigatie', 'bb-theme-child' ),
		'filter_items_list'     => __( 'Filter vacature lijst', 'bb-theme-child' ),
	);
	$rewrite = array(
		'slug'                  => 'vacatures',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$args = array(
		'label'                 => __( 'Vacature', 'bb-theme-child' ),
		'description'           => __( 'Vacatures', 'bb-theme-child' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'revisions' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 10,
		'menu_icon'             => 'dashicons-format-aside',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => 'vacatures',
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'rewrite'               => $rewrite,
		'capability_type'       => 'post',
		'show_in_rest'          => true,
	);
	register_post_type( 'vacature', $args );

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

}