Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Réalisations

// Register Custom Post Type
function _cpt_realisations() {

	$labels = array(
		'name'                  => _x( 'Réalisations', 'Post Type General Name', 'text_domain' ),
		'singular_name'         => _x( 'Réalisation', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'             => __( 'Réalisations', 'text_domain' ),
		'name_admin_bar'        => __( 'Réalisations', 'text_domain' ),
		'archives'              => __( 'Archives des réalisations', 'text_domain' ),
		'attributes'            => __( 'Attribut de réalisation', 'text_domain' ),
		'parent_item_colon'     => __( 'Réalisation parent', 'text_domain' ),
		'all_items'             => __( 'Tous les réalisations', 'text_domain' ),
		'add_new_item'          => __( 'Add New Item', 'text_domain' ),
		'add_new'               => __( 'Ajouter', 'text_domain' ),
		'new_item'              => __( 'Nouvelle réalisation', 'text_domain' ),
		'edit_item'             => __( 'Modifier', 'text_domain' ),
		'update_item'           => __( 'Mettre à jour', 'text_domain' ),
		'view_item'             => __( 'Voir la réalisation', 'text_domain' ),
		'view_items'            => __( 'Voir toute les réalisations', 'text_domain' ),
		'search_items'          => __( 'Recherche', 'text_domain' ),
		'not_found'             => __( 'Non trouvé', 'text_domain' ),
		'not_found_in_trash'    => __( 'Rien trouvé dans la corbeil', 'text_domain' ),
		'featured_image'        => __( 'Image mise en avant', 'text_domain' ),
		'set_featured_image'    => __( 'Définir l’image mise en avant', 'text_domain' ),
		'remove_featured_image' => __( 'Supprimer l'image mise en avant', 'text_domain' ),
		'use_featured_image'    => __( 'Utiliser comme image mise en avant', 'text_domain' ),
		'insert_into_item'      => __( 'Insérer dans l'article', 'text_domain' ),
		'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),
		'items_list'            => __( 'Liste', 'text_domain' ),
		'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),
		'filter_items_list'     => __( 'Filter items list', 'text_domain' ),
	);
	$args = array(
		'label'                 => __( 'Réalisation', 'text_domain' ),
		'description'           => __( 'Toute les pages des réalisations', 'text_domain' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', ),
		'taxonomies'            => array( '_tax_realisations' ),
		'hierarchical'          => true,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-hammer',
		'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'       => 'page',
	);
	register_post_type( 'Réalisations', $args );

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