Custom Post Type + Custom Taxonomies and Meta Boxes by code

Hi,
I put together the pieces of code provided by GenerateWP in the functions.php of my child theme without result, I also tried in a custom plugin, without success either.
In both cases only CPTs and Taxonomies work.
How can I link the three PHP codes together in a custom plugin?

Here is my little plugin with the CPT and its Taxonomies

<?php
/* Plugin Name: UBS CPT Membres 2 Description: Crée CPT Membres Version: 2.0.0 Author: Guilherme Negreiros Author URI: https://unbonsite.ca/ 
*/function cptui_register_my_cpts_membre() { /** * Post Type: Membres. */ $labels = [ "name" => __( "Membres", "ubs" ), "singular_name" => __( "Membre", "ubs" ), "menu_name" => __( "Membres", "ubs" ), "all_items" => __( "Tous les membres", "ubs" ), "add_new" => __( "Nouveau", "ubs" ), "add_new_item" => __( "Ajouter membre", "ubs" ), "edit_item" => __( "Edit Membre", "ubs" ), "new_item" => __( "Nouveau Membre", "ubs" ), "view_item" => __( "Voir Membre", "ubs" ), "view_items" => __( "Voir les membres", "ubs" ), "search_items" => __( "Search Membres", "ubs" ), "not_found" => __( "No Membres found", "ubs" ), "not_found_in_trash" => __( "No Membres found in trash", "ubs" ), "parent" => __( "Parent Membre:", "ubs" ), "featured_image" => __( "Image principal du Membre", "ubs" ), "set_featured_image" => __( "Set featured image for this Membre", "ubs" ), "remove_featured_image" => __( "Remove featured image for this Membre", "ubs" ), "use_featured_image" => __( "Use as featured image for this Membre", "ubs" ), "archives" => __( "Membre archives", "ubs" ), "insert_into_item" => __( "Insert into Membre", "ubs" ), "uploaded_to_this_item" => __( "Upload to this Membre", "ubs" ), "filter_items_list" => __( "Filter Membres list", "ubs" ), "items_list_navigation" => __( "Membres list navigation", "ubs" ), "items_list" => __( "Membres list", "ubs" ), "attributes" => __( "Membres attributes", "ubs" ), "name_admin_bar" => __( "Membre", "ubs" ), "item_published" => __( "Membre published", "ubs" ), "item_published_privately" => __( "Membre published privately.", "ubs" ), "item_reverted_to_draft" => __( "Membre reverted to draft.", "ubs" ), "item_scheduled" => __( "Membre scheduled", "ubs" ), "item_updated" => __( "Membre updated.", "ubs" ), "parent_item_colon" => __( "Parent Membre:", "ubs" ), ]; $args = [ "label" => __( "Membres", "ubs" ), "labels" => $labels, "description" => "Les membres de la Coopérative Quartier-monde", "public" => true, "publicly_queryable" => true, "show_ui" => true, "show_in_rest" => true, "rest_base" => "", "rest_controller_class" => "WP_REST_Posts_Controller", "has_archive" => "nos-membres", "show_in_menu" => true, "show_in_nav_menus" => true, "delete_with_user" => false, "exclude_from_search" => false, "capability_type" => "post", "map_meta_cap" => true, "hierarchical" => false, "rewrite" => [ "slug" => "membre", "with_front" => true ], "query_var" => true, "menu_position" => 3, "menu_icon" => "dashicons-businessman", "supports" => [ "title", "editor", "thumbnail", "excerpt", "trackbacks", "custom-fields", "comments", "revisions", "author", "page-attributes", "post-formats" ], "taxonomies" => [ "type_de_membre", "etiquettes_des_membres", "regions_desservies" ], "show_in_graphql" => false, ]; register_post_type( "membre", $args );}add_action( 'init', 'cptui_register_my_cpts_membre' );function cptui_register_my_taxes() { /** * Taxonomy: Types de membres. */ $labels = [ "name" => __( "Types de membres", "ubs" ), "singular_name" => __( "Type de membre", "ubs" ), "menu_name" => __( "Types de membres", "ubs" ), "all_items" => __( "All Types de membres", "ubs" ), "edit_item" => __( "Edit Type de membre", "ubs" ), "view_item" => __( "View Type de membre", "ubs" ), "update_item" => __( "Update Type de membre name", "ubs" ), "add_new_item" => __( "Add new Type de membre", "ubs" ), "new_item_name" => __( "New Type de membre name", "ubs" ), "parent_item" => __( "Parent Type de membre", "ubs" ), "parent_item_colon" => __( "Parent Type de membre:", "ubs" ), "search_items" => __( "Search Types de membres", "ubs" ), "popular_items" => __( "Popular Types de membres", "ubs" ), "separate_items_with_commas" => __( "Separate Types de membres with commas", "ubs" ), "add_or_remove_items" => __( "Add or remove Types de membres", "ubs" ), "choose_from_most_used" => __( "Choose from the most used Types de membres", "ubs" ), "not_found" => __( "No Types de membres found", "ubs" ), "no_terms" => __( "No Types de membres", "ubs" ), "items_list_navigation" => __( "Types de membres list navigation", "ubs" ), "items_list" => __( "Types de membres list", "ubs" ), "back_to_items" => __( "Back to Types de membres", "ubs" ), ];  $args = [ "label" => __( "Types de membres", "ubs" ), "labels" => $labels, "public" => true, "publicly_queryable" => true, "hierarchical" => true, "show_ui" => true, "show_in_menu" => true, "show_in_nav_menus" => true, "query_var" => true, "rewrite" => [ 'slug' => 'type_de_membre', 'with_front' => true, ], "show_admin_column" => false, "show_in_rest" => true, "show_tagcloud" => false, "rest_base" => "type_de_membre", "rest_controller_class" => "WP_REST_Terms_Controller", "show_in_quick_edit" => false, "show_in_graphql" => false, ]; register_taxonomy( "type_de_membre", [ "membre" ], $args ); /** * Taxonomy: Étiquettes des membres. */ $labels = [ "name" => __( "Étiquettes des membres", "ubs" ), "singular_name" => __( "Étiquette des membres", "ubs" ), "menu_name" => __( "Étiquettes des membres", "ubs" ), "all_items" => __( "All Étiquettes des membres", "ubs" ), "edit_item" => __( "Edit Étiquette des membres", "ubs" ), "view_item" => __( "View Étiquette des membres", "ubs" ), "update_item" => __( "Update Étiquette des membres name", "ubs" ), "add_new_item" => __( "Add new Étiquette des membres", "ubs" ), "new_item_name" => __( "New Étiquette des membres name", "ubs" ), "parent_item" => __( "Parent Étiquette des membres", "ubs" ), "parent_item_colon" => __( "Parent Étiquette des membres:", "ubs" ), "search_items" => __( "Search Étiquettes des membres", "ubs" ), "popular_items" => __( "Popular Étiquettes des membres", "ubs" ), "separate_items_with_commas" => __( "Separate Étiquettes des membres with commas", "ubs" ), "add_or_remove_items" => __( "Add or remove Étiquettes des membres", "ubs" ), "choose_from_most_used" => __( "Choose from the most used Étiquettes des membres", "ubs" ), "not_found" => __( "No Étiquettes des membres found", "ubs" ), "no_terms" => __( "No Étiquettes des membres", "ubs" ), "items_list_navigation" => __( "Étiquettes des membres list navigation", "ubs" ), "items_list" => __( "Étiquettes des membres list", "ubs" ), "back_to_items" => __( "Back to Étiquettes des membres", "ubs" ), ];  $args = [ "label" => __( "Étiquettes des membres", "ubs" ), "labels" => $labels, "public" => true, "publicly_queryable" => true, "hierarchical" => false, "show_ui" => true, "show_in_menu" => true, "show_in_nav_menus" => true, "query_var" => true, "rewrite" => [ 'slug' => 'etiquettes_des_membres', 'with_front' => true, ], "show_admin_column" => false, "show_in_rest" => true, "show_tagcloud" => false, "rest_base" => "etiquettes_des_membres", "rest_controller_class" => "WP_REST_Terms_Controller", "show_in_quick_edit" => false, "show_in_graphql" => false, ]; register_taxonomy( "etiquettes_des_membres", [ "membre" ], $args ); /** * Taxonomy: Régions desservie. */ $labels = [ "name" => __( "Régions desservie", "ubs" ), "singular_name" => __( "Région Desservie", "ubs" ), "menu_name" => __( "Régions desservie", "ubs" ), "all_items" => __( "All Régions desservie", "ubs" ), "edit_item" => __( "Edit Région Desservie", "ubs" ), "view_item" => __( "View Région Desservie", "ubs" ), "update_item" => __( "Update Région Désservie name", "ubs" ), "add_new_item" => __( "Ajouter nouvelle région Desservie", "ubs" ), "new_item_name" => __( "New Région Désservie name", "ubs" ), "parent_item" => __( "Parent Région Désservie", "ubs" ), "parent_item_colon" => __( "Parent Région Désservie:", "ubs" ), "search_items" => __( "Search Régions désservies", "ubs" ), "popular_items" => __( "Popular Régions désservies", "ubs" ), "separate_items_with_commas" => __( "Separate Régions désservies with commas", "ubs" ), "add_or_remove_items" => __( "Add or remove Régions désservies", "ubs" ), "choose_from_most_used" => __( "Choose from the most used Régions désservies", "ubs" ), "not_found" => __( "No Régions désservies found", "ubs" ), "no_terms" => __( "No Régions désservies", "ubs" ), "items_list_navigation" => __( "Régions désservies list navigation", "ubs" ), "items_list" => __( "Régions désservies list", "ubs" ), "back_to_items" => __( "Back to Régions désservies", "ubs" ), ];  $args = [ "label" => __( "Régions desservie", "ubs" ), "labels" => $labels, "public" => true, "publicly_queryable" => true, "hierarchical" => true, "show_ui" => true, "show_in_menu" => true, "show_in_nav_menus" => true, "query_var" => true, "rewrite" => [ 'slug' => 'regions_desservies', 'with_front' => true, ], "show_admin_column" => true, "show_in_rest" => true, "show_tagcloud" => false, "rest_base" => "regions_desservies", "rest_controller_class" => "WP_REST_Terms_Controller", "show_in_quick_edit" => true, "show_in_graphql" => false, ]; register_taxonomy( "regions_desservies", [ "membre" ], $args );}add_action( 'init', 'cptui_register_my_taxes' );

Here the Custom Fields code

<?php

add_filter( "rwmb_meta_boxes", "membres_custom_fields_register_meta_boxes" );

function your_prefix_register_meta_boxes( $meta_boxes ) {

 $prefix = "";

 $meta_boxes[] = [

 "title" => esc_html__( "Infos du membre", "ubs" ),

 "id" => "infos-du-membre",

 "context" => "after_title",

 "autosave" => true,

 "fields" => [

 [

 "type" => "heading",

 "name" => esc_html__( "Présentation", "ubs" ),

 ],

 [

 "type" => "text",

 "name" => esc_html__( "Titre", "ubs" ),

 "id" => $prefix . "titre",

 "desc" => esc_html__( "Nom du membre ou de sa compagnie", "ubs" ),

 "placeholder" => esc_html__( "Nom", "ubs" ),

 "size" => 50,

 ],

 [

 "type" => "image",

 "name" => esc_html__( "Photo ou logo", "ubs" ),

 "id" => $prefix . "photo_ou_logo",

 "max_file_uploads" => 1,

 "force_delete" => true,

 "after" => "L"image doit peser 500 ko maximum",

 "class" => "ubs-upload-logo",

 ],

 [

 "type" => "text",

 "name" => esc_html__( "Description", "ubs" ),

 "id" => $prefix . "description",

 "desc" => esc_html__( "Description du membre, ses services, produits ou compagnie", "ubs" ),

 "placeholder" => esc_html__( "Ajoutez un texte vendeur", "ubs" ),

 "size" => 300,

 ],

 [

 "type" => "select_advanced",

 "name" => esc_html__( "Région", "ubs" ),

 "id" => $prefix . "region",

 "desc" => esc_html__( "Sélectionnez la région desservie par le membre", "ubs" ),

 "options" => [

 "Abitibi-Témiscamingue" => esc_html__( "Abitibi-Témiscamingue", "ubs" ),

 "Bas-Saint-Laurent" => esc_html__( "Bas-Saint-Laurent", "ubs" ),

 "Capitale-Nationale" => esc_html__( "Capitale-Nationale", "ubs" ),

 "Centre-du-Québec" => esc_html__( "Centre-du-Québec", "ubs" ),

 "Chaudière-Appalaches" => esc_html__( "Chaudière-Appalaches", "ubs" ),

 "Côte-Nord" => esc_html__( "Côte-Nord", "ubs" ),

 "Estrie" => esc_html__( "Estrie", "ubs" ),

 "Gaspésie–Îles-de-la-Madeleine" => esc_html__( "Gaspésie–Îles-de-la-Madeleine", "ubs" ),

 "Lanaudière" => esc_html__( "Lanaudière", "ubs" ),

 "Laurentides" => esc_html__( "Laurentides", "ubs" ),

 "Laval" => esc_html__( "Laval", "ubs" ),

 "Mauricie" => esc_html__( "Mauricie", "ubs" ),

 "Montérégie" => esc_html__( "Montérégie", "ubs" ),

 "Montréal" => esc_html__( "Montréal", "ubs" ),

 "Nord-du-Québec" => esc_html__( "Nord-du-Québec", "ubs" ),

 "Outaouais" => esc_html__( "Outaouais", "ubs" ),

 "Saguenay–Lac-Saint-Jean" => esc_html__( "Saguenay–Lac-Saint-Jean", "ubs" ),

 ],

 "multiple" => true,

 "js_options" => [

 "allowClear" => true,

 ],

 ],

 [

 "type" => "url",

 "name" => esc_html__( "Vidéo promotionnelle", "ubs" ),

 "id" => $prefix . "video_promotionnelle",

 "desc" => esc_html__( "Ajoutez l"URL Youtube de la vidéo", "ubs" ),

 "placeholder" => esc_html__( "https://youtu.be/5HM2zx_Zf3U", "ubs" ),

 "size" => 50,

 ],

 [

 "type" => "divider",

 ],

 [

 "type" => "heading",

 "name" => esc_html__( "Contact", "ubs" ),

 ],

 [

 "type" => "url",

 "name" => esc_html__( "Site web", "ubs" ),

 "id" => $prefix . "site_web",

 "desc" => esc_html__( "Ajoutez l"adresse de son site web", "ubs" ),

 "placeholder" => esc_html__( "monsite.ca", "ubs" ),

 "size" => 50,

 ],

 [

 "type" => "email",

 "name" => esc_html__( "Adresse Email", "ubs" ),

 "id" => $prefix . "adresse_email",

 "desc" => esc_html__( "Ajouter son adresse email professionnel", "ubs" ),

 "placeholder" => esc_html__( "johndoe@monsite.ca", "ubs" ),

 "size" => 50,

 ],

 [

 "type" => "number",

 "name" => esc_html__( "Téléphone", "ubs" ),

 "id" => $prefix . "telephone",

 "step" => "any",

 "placeholder" => esc_html__( "1 819 1234567", "ubs" ),

 ],

 ],

 ];

 return $meta_boxes;

}

Thanks for your help,