Code export to theme loses WPML translation connection
-
Hi,
I’ve built a website containing a CPT and many custom taxonomies. The site is set up with WPML, and the taxonomies have been translated from default Dutch to English.I copied the code from the CPT UI tools page, and inserted it into my theme.
Now when I disable the CPT UI plugin, the taxonomies show up in both languages in WP-admin menus and in the WPML Taxonomies. So the translated taxonomies lose their connection to the default language.
Do you know how this can be avoided?
-
Not sure what may be going on and why with that. Does it continue to happen if you remove the code from your theme’s functions.php and re-activate CPTUI?
Hi,
thanks for your help!No. When I remove the code from my theme and re-activate the plugin, things are back to normal.
Willing to share the code portion that you’re copy/pasting? Curious if there’s any sort of oddities going on with settings, but I am not foreseeing any.
And to be clear from your original post, menu items and places are showing all the translated variations at once, instead of just a “current language chosen” ?
Yes, no problem. But it’s quite a lot:
function cptui_register_my_cpts() {
/**
* Post Type: Woningen.
*/$labels = [
“name” => esc_html__( “Woningen”, “starchild” ),
“singular_name” => esc_html__( “Woning”, “starchild” ),
“menu_name” => esc_html__( “Woningen”, “starchild” ),
“all_items” => esc_html__( “Alle Woningen”, “starchild” ),
“add_new” => esc_html__( “Nieuwe toevoegen”, “starchild” ),
“add_new_item” => esc_html__( “Nieuwe Woning toevoegen”, “starchild” ),
“edit_item” => esc_html__( “Bewerk Woning”, “starchild” ),
“new_item” => esc_html__( “Nieuw Woning”, “starchild” ),
“view_item” => esc_html__( “Bekijk Woning”, “starchild” ),
“view_items” => esc_html__( “Bekijk Woningen”, “starchild” ),
“search_items” => esc_html__( “Zoek Woningen”, “starchild” ),
“not_found” => esc_html__( “Geen Woningen gevonden”, “starchild” ),
“not_found_in_trash” => esc_html__( “Geen Woningen gevonden in prullenbak”, “starchild” ),
“parent” => esc_html__( “Hoofd Woning:”, “starchild” ),
“featured_image” => esc_html__( “Uitgelichte afbeelding voor deze Woning”, “starchild” ),
“set_featured_image” => esc_html__( “Uitgelichte afbeelding instellen voor deze Woning”, “starchild” ),
“remove_featured_image” => esc_html__( “Uitgelichte afbeelding voor deze Woning verwijderen”, “starchild” ),
“use_featured_image” => esc_html__( “Gebruiken als uitgelichte afbeelding voor deze Woning”, “starchild” ),
“archives” => esc_html__( “Woning archieven”, “starchild” ),
“insert_into_item” => esc_html__( “Invoegen in Woning”, “starchild” ),
“uploaded_to_this_item” => esc_html__( “Upload naar deze Woning”, “starchild” ),
“filter_items_list” => esc_html__( “Filter Woningen lijst”, “starchild” ),
“items_list_navigation” => esc_html__( “Woningen lijstnavigatie”, “starchild” ),
“items_list” => esc_html__( “Woningen lijst”, “starchild” ),
“attributes” => esc_html__( “Woningen attributen”, “starchild” ),
“name_admin_bar” => esc_html__( “Woning”, “starchild” ),
“item_published” => esc_html__( “Woning gepubliceerd”, “starchild” ),
“item_published_privately” => esc_html__( “Woning privé gepubliceerd.”, “starchild” ),
“item_reverted_to_draft” => esc_html__( “Woning omgezet naar concept.”, “starchild” ),
“item_scheduled” => esc_html__( “Woning ingepland”, “starchild” ),
“item_updated” => esc_html__( “Woning bijgewerkt.”, “starchild” ),
“parent_item_colon” => esc_html__( “Hoofd Woning:”, “starchild” ),
];$args = [
“label” => esc_html__( “Woningen”, “starchild” ),
“labels” => $labels,
“description” => “”,
“public” => true,
“publicly_queryable” => true,
“show_ui” => true,
“show_in_rest” => true,
“rest_base” => “”,
“rest_controller_class” => “WP_REST_Posts_Controller”,
“rest_namespace” => “wp/v2”,
“has_archive” => false,
“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” => true,
“can_export” => true,
“rewrite” => [ “slug” => “woning”, “with_front” => true ],
“query_var” => true,
“menu_icon” => “dashicons-admin-home”,
“supports” => [ “title”, “editor”, “thumbnail”, “custom-fields”, “page-attributes” ],
“taxonomies” => [ “category”, “type_woning”, “bouwsoort”, “voorziening”, “plaats”, “ligging”, “parkeren”, “verwarming”, “isolatie”, “tuintype”, “voorziening_sanitair” ],
“show_in_graphql” => false,
];register_post_type( “woning”, $args );
}add_action( ‘init’, ‘cptui_register_my_cpts’ );
function cptui_register_my_taxes() {
/**
* Taxonomy: Type woning.
*/$labels = [
“name” => esc_html__( “Type woning”, “starchild” ),
“singular_name” => esc_html__( “Type woning”, “starchild” ),
“menu_name” => esc_html__( “Type woning”, “starchild” ),
“all_items” => esc_html__( “All Type woning”, “starchild” ),
“edit_item” => esc_html__( “Edit Type woning”, “starchild” ),
“view_item” => esc_html__( “View Type woning”, “starchild” ),
“update_item” => esc_html__( “Update Type woning name”, “starchild” ),
“add_new_item” => esc_html__( “Add new Type woning”, “starchild” ),
“new_item_name” => esc_html__( “New Type woning name”, “starchild” ),
“parent_item” => esc_html__( “Parent Type woning”, “starchild” ),
“parent_item_colon” => esc_html__( “Parent Type woning:”, “starchild” ),
“search_items” => esc_html__( “Search Type woning”, “starchild” ),
“popular_items” => esc_html__( “Popular Type woning”, “starchild” ),
“separate_items_with_commas” => esc_html__( “Separate Type woning with commas”, “starchild” ),
“add_or_remove_items” => esc_html__( “Add or remove Type woning”, “starchild” ),
“choose_from_most_used” => esc_html__( “Choose from the most used Type woning”, “starchild” ),
“not_found” => esc_html__( “No Type woning found”, “starchild” ),
“no_terms” => esc_html__( “No Type woning”, “starchild” ),
“items_list_navigation” => esc_html__( “Type woning list navigation”, “starchild” ),
“items_list” => esc_html__( “Type woning list”, “starchild” ),
“back_to_items” => esc_html__( “Back to Type woning”, “starchild” ),
“name_field_description” => esc_html__( “The name is how it appears on your site.”, “starchild” ),
“parent_field_description” => esc_html__( “Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.”, “starchild” ),
“slug_field_description” => esc_html__( “The slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.”, “starchild” ),
“desc_field_description” => esc_html__( “The description is not prominent by default; however, some themes may show it.”, “starchild” ),
];$args = [
“label” => esc_html__( “Type woning”, “starchild” ),
“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’ => ‘type_woning’, ‘with_front’ => true, ],
“show_admin_column” => false,
“show_in_rest” => true,
“show_tagcloud” => false,
“rest_base” => “type_woning”,
“rest_controller_class” => “WP_REST_Terms_Controller”,
“rest_namespace” => “wp/v2”,
“show_in_quick_edit” => false,
“sort” => false,
“show_in_graphql” => false,
];
register_taxonomy( “type_woning”, [ “woning” ], $args );/**
* Taxonomy: Bouwsoort.
*/$labels = [
“name” => esc_html__( “Bouwsoort”, “starchild” ),
“singular_name” => esc_html__( “Bouwsoort”, “starchild” ),
“menu_name” => esc_html__( “Bouwsoort”, “starchild” ),
“all_items” => esc_html__( “Alle Bouwsoorten”, “starchild” ),
“edit_item” => esc_html__( “Bewerk Bouwsoort”, “starchild” ),
“view_item” => esc_html__( “Bekijk Bouwsoort”, “starchild” ),
“update_item” => esc_html__( “Bijwerken Bouwsoort naam”, “starchild” ),
“add_new_item” => esc_html__( “Nieuwe Bouwsoort toevoegen”, “starchild” ),
“new_item_name” => esc_html__( “Nieuwe Bouwsoort naam”, “starchild” ),
“parent_item” => esc_html__( “Hoofd Bouwsoort”, “starchild” ),
“parent_item_colon” => esc_html__( “Hoofd Bouwsoort:”, “starchild” ),
“search_items” => esc_html__( “Zoek Bouwsoort”, “starchild” ),
“popular_items” => esc_html__( “Populaire Bouwsoort”, “starchild” ),
“separate_items_with_commas” => esc_html__( “Meerdere Bouwsoorten scheiden met komma’s”, “starchild” ),
“add_or_remove_items” => esc_html__( “Toevoegen of verwijderen van Bouwsoort”, “starchild” ),
“choose_from_most_used” => esc_html__( “Kies uit de meest gebruikte Bouwsoort”, “starchild” ),
“not_found” => esc_html__( “Geen Bouwsoortgevonden”, “starchild” ),
“no_terms” => esc_html__( “Geen Bouwsoort”, “starchild” ),
“items_list_navigation” => esc_html__( “Bouwsoort lijstnavigatie”, “starchild” ),
“items_list” => esc_html__( “Bouwsoort lijst”, “starchild” ),
“back_to_items” => esc_html__( “Terug naar Bouwsoort”, “starchild” ),
“name_field_description” => esc_html__( “De naam is zoals hij op je site staat.”, “starchild” ),
“parent_field_description” => esc_html__( “Wijs een hoofdterm toe om een hiërarchie te creëren. De term Jazz, bijvoorbeeld, zou het hoofd zijn van Bebop en Big Band.”, “starchild” ),
“slug_field_description” => esc_html__( “De slug is de URL vriendelijke versie van de naam. Het is meestal allemaal kleine letters en bevat alleen letters, cijfers en koppeltekens.”, “starchild” ),
“desc_field_description” => esc_html__( “De beschrijving is standaard niet prominent aanwezig; sommige thema’s kunnen deze echter wel tonen.”, “starchild” ),
];$args = [
“label” => esc_html__( “Bouwsoort”, “starchild” ),
“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’ => ‘bouwsoort’, ‘with_front’ => true, ],
“show_admin_column” => false,
“show_in_rest” => true,
“show_tagcloud” => false,
“rest_base” => “bouwsoort”,
“rest_controller_class” => “WP_REST_Terms_Controller”,
“rest_namespace” => “wp/v2”,
“show_in_quick_edit” => false,
“sort” => false,
“show_in_graphql” => false,
];
register_taxonomy( “bouwsoort”, [ “woning” ], $args );/**
* Taxonomy: Voorzieningen.
*/$labels = [
“name” => esc_html__( “Voorzieningen”, “starchild” ),
“singular_name” => esc_html__( “Voorziening”, “starchild” ),
“menu_name” => esc_html__( “Voorzieningen”, “starchild” ),
“all_items” => esc_html__( “All Voorzieningen”, “starchild” ),
“edit_item” => esc_html__( “Edit Voorziening”, “starchild” ),
“view_item” => esc_html__( “View Voorziening”, “starchild” ),
“update_item” => esc_html__( “Update Voorziening name”, “starchild” ),
“add_new_item” => esc_html__( “Add new Voorziening”, “starchild” ),
“new_item_name” => esc_html__( “New Voorziening name”, “starchild” ),
“parent_item” => esc_html__( “Parent Voorziening”, “starchild” ),
“parent_item_colon” => esc_html__( “Parent Voorziening:”, “starchild” ),
“search_items” => esc_html__( “Search Voorzieningen”, “starchild” ),
“popular_items” => esc_html__( “Popular Voorzieningen”, “starchild” ),
“separate_items_with_commas” => esc_html__( “Separate Voorzieningen with commas”, “starchild” ),
“add_or_remove_items” => esc_html__( “Add or remove Voorzieningen”, “starchild” ),
“choose_from_most_used” => esc_html__( “Choose from the most used Voorzieningen”, “starchild” ),
“not_found” => esc_html__( “No Voorzieningen found”, “starchild” ),
“no_terms” => esc_html__( “No Voorzieningen”, “starchild” ),
“items_list_navigation” => esc_html__( “Voorzieningen list navigation”, “starchild” ),
“items_list” => esc_html__( “Voorzieningen list”, “starchild” ),
“back_to_items” => esc_html__( “Back to Voorzieningen”, “starchild” ),
“name_field_description” => esc_html__( “The name is how it appears on your site.”, “starchild” ),
“parent_field_description” => esc_html__( “Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.”, “starchild” ),
“slug_field_description” => esc_html__( “The slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.”, “starchild” ),
“desc_field_description” => esc_html__( “The description is not prominent by default; however, some themes may show it.”, “starchild” ),
];$args = [
“label” => esc_html__( “Voorzieningen”, “starchild” ),
“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’ => ‘voorziening’, ‘with_front’ => true, ],
“show_admin_column” => false,
“show_in_rest” => true,
“show_tagcloud” => false,
“rest_base” => “voorziening”,
“rest_controller_class” => “WP_REST_Terms_Controller”,
“rest_namespace” => “wp/v2”,
“show_in_quick_edit” => false,
“sort” => false,
“show_in_graphql” => false,
];
register_taxonomy( “voorziening”, [ “woning” ], $args );/**
* Taxonomy: Plaatsen.
*/$labels = [
“name” => esc_html__( “Plaatsen”, “starchild” ),
“singular_name” => esc_html__( “Plaats”, “starchild” ),
“menu_name” => esc_html__( “Stad”, “starchild” ),
“all_items” => esc_html__( “Alle Steden”, “starchild” ),
“edit_item” => esc_html__( “Bewerk Stad”, “starchild” ),
“view_item” => esc_html__( “Bekijk Stad”, “starchild” ),
“update_item” => esc_html__( “Bijwerken Stad naam”, “starchild” ),
“add_new_item” => esc_html__( “Nieuwe Stad toevoegen”, “starchild” ),
“new_item_name” => esc_html__( “Nieuwe Stad naam”, “starchild” ),
“parent_item” => esc_html__( “Hoofd Stad”, “starchild” ),
“parent_item_colon” => esc_html__( “Hoofd Stad:”, “starchild” ),
“search_items” => esc_html__( “Zoek Stad”, “starchild” ),
“popular_items” => esc_html__( “Populaire Stad”, “starchild” ),
“separate_items_with_commas” => esc_html__( “Meerdere Steden scheiden met komma’s”, “starchild” ),
“add_or_remove_items” => esc_html__( “Toevoegen of verwijderen van Stad”, “starchild” ),
“choose_from_most_used” => esc_html__( “Kies uit de meest gebruikte Stad”, “starchild” ),
“not_found” => esc_html__( “Geen Stad gevonden”, “starchild” ),
“no_terms” => esc_html__( “Geen Stad”, “starchild” ),
“items_list_navigation” => esc_html__( “Steden lijstnavigatie”, “starchild” ),
“items_list” => esc_html__( “Steden lijst”, “starchild” ),
“back_to_items” => esc_html__( “Terug naar Steden”, “starchild” ),
“name_field_description” => esc_html__( “De naam is zoals hij op je site staat.”, “starchild” ),
“parent_field_description” => esc_html__( “Wijs een hoofdterm toe om een hiërarchie te creëren. De term Jazz, bijvoorbeeld, zou het hoofd zijn van Bebop en Big Band.”, “starchild” ),
“slug_field_description” => esc_html__( “De slug is de URL vriendelijke versie van de naam. Het is meestal allemaal kleine letters en bevat alleen letters, cijfers en koppeltekens.”, “starchild” ),
“desc_field_description” => esc_html__( “De beschrijving is standaard niet prominent aanwezig; sommige thema’s kunnen deze echter wel tonen.”, “starchild” ),
];$args = [
“label” => esc_html__( “Plaatsen”, “starchild” ),
“labels” => $labels,
“public” => true,
“publicly_queryable” => false,
“hierarchical” => true,
“show_ui” => true,
“show_in_menu” => true,
“show_in_nav_menus” => true,
“query_var” => true,
“rewrite” => [ ‘slug’ => ‘plaats’, ‘with_front’ => true, ],
“show_admin_column” => false,
“show_in_rest” => true,
“show_tagcloud” => false,
“rest_base” => “plaats”,
“rest_controller_class” => “WP_REST_Terms_Controller”,
“rest_namespace” => “wp/v2”,
“show_in_quick_edit” => false,
“sort” => false,
“show_in_graphql” => false,
];
register_taxonomy( “plaats”, [ “woning” ], $args );/**
* Taxonomy: Parkeren.
*/$labels = [
“name” => esc_html__( “Parkeren”, “starchild” ),
“singular_name” => esc_html__( “Parkeergelegenheid”, “starchild” ),
“menu_name” => esc_html__( “Parkeren”, “starchild” ),
“all_items” => esc_html__( “All Parkeren”, “starchild” ),
“edit_item” => esc_html__( “Edit Parkeergelegenheid”, “starchild” ),
“view_item” => esc_html__( “View Parkeergelegenheid”, “starchild” ),
“update_item” => esc_html__( “Update Parkeergelegenheid name”, “starchild” ),
“add_new_item” => esc_html__( “Add new Parkeergelegenheid”, “starchild” ),
“new_item_name” => esc_html__( “New Parkeergelegenheid name”, “starchild” ),
“parent_item” => esc_html__( “Parent Parkeergelegenheid”, “starchild” ),
“parent_item_colon” => esc_html__( “Parent Parkeergelegenheid:”, “starchild” ),
“search_items” => esc_html__( “Search Parkeren”, “starchild” ),
“popular_items” => esc_html__( “Popular Parkeren”, “starchild” ),
“separate_items_with_commas” => esc_html__( “Separate Parkeren with commas”, “starchild” ),
“add_or_remove_items” => esc_html__( “Add or remove Parkeren”, “starchild” ),
“choose_from_most_used” => esc_html__( “Choose from the most used Parkeren”, “starchild” ),
“not_found” => esc_html__( “No Parkeren found”, “starchild” ),
“no_terms” => esc_html__( “No Parkeren”, “starchild” ),
“items_list_navigation” => esc_html__( “Parkeren list navigation”, “starchild” ),
“items_list” => esc_html__( “Parkeren list”, “starchild” ),
“back_to_items” => esc_html__( “Back to Parkeren”, “starchild” ),
“name_field_description” => esc_html__( “The name is how it appears on your site.”, “starchild” ),
“parent_field_description” => esc_html__( “Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.”, “starchild” ),
“slug_field_description” => esc_html__( “The slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.”, “starchild” ),
“desc_field_description” => esc_html__( “The description is not prominent by default; however, some themes may show it.”, “starchild” ),
];$args = [
“label” => esc_html__( “Parkeren”, “starchild” ),
“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’ => ‘parkeren’, ‘with_front’ => true, ],
“show_admin_column” => false,
“show_in_rest” => true,
“show_tagcloud” => false,
“rest_base” => “parkeren”,
“rest_controller_class” => “WP_REST_Terms_Controller”,
“rest_namespace” => “wp/v2”,
“show_in_quick_edit” => false,
“sort” => false,
“show_in_graphql” => false,
];
register_taxonomy( “parkeren”, [ “woning” ], $args );/**
* Taxonomy: Verwarming.
*/$labels = [
“name” => esc_html__( “Verwarming”, “starchild” ),
“singular_name” => esc_html__( “Verwarming”, “starchild” ),
“menu_name” => esc_html__( “Verwarming”, “starchild” ),
“all_items” => esc_html__( “All Verwarming”, “starchild” ),
“edit_item” => esc_html__( “Edit Verwarming”, “starchild” ),
“view_item” => esc_html__( “View Verwarming”, “starchild” ),
“update_item” => esc_html__( “Update Verwarming name”, “starchild” ),
“add_new_item” => esc_html__( “Add new Verwarming”, “starchild” ),
“new_item_name” => esc_html__( “New Verwarming name”, “starchild” ),
“parent_item” => esc_html__( “Parent Verwarming”, “starchild” ),
“parent_item_colon” => esc_html__( “Parent Verwarming:”, “starchild” ),
“search_items” => esc_html__( “Search Verwarming”, “starchild” ),
“popular_items” => esc_html__( “Popular Verwarming”, “starchild” ),
“separate_items_with_commas” => esc_html__( “Separate Verwarming with commas”, “starchild” ),
“add_or_remove_items” => esc_html__( “Add or remove Verwarming”, “starchild” ),
“choose_from_most_used” => esc_html__( “Choose from the most used Verwarming”, “starchild” ),
“not_found” => esc_html__( “No Verwarming found”, “starchild” ),
“no_terms” => esc_html__( “No Verwarming”, “starchild” ),
“items_list_navigation” => esc_html__( “Verwarming list navigation”, “starchild” ),
“items_list” => esc_html__( “Verwarming list”, “starchild” ),
“back_to_items” => esc_html__( “Back to Verwarming”, “starchild” ),
“name_field_description” => esc_html__( “The name is how it appears on your site.”, “starchild” ),
“parent_field_description” => esc_html__( “Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.”, “starchild” ),
“slug_field_description” => esc_html__( “The slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.”, “starchild” ),
“desc_field_description” => esc_html__( “The description is not prominent by default; however, some themes may show it.”, “starchild” ),
];$args = [
“label” => esc_html__( “Verwarming”, “starchild” ),
“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’ => ‘verwarming’, ‘with_front’ => true, ],
“show_admin_column” => false,
“show_in_rest” => true,
“show_tagcloud” => false,
“rest_base” => “verwarming”,
“rest_controller_class” => “WP_REST_Terms_Controller”,
“rest_namespace” => “wp/v2”,
“show_in_quick_edit” => false,
“sort” => false,
“show_in_graphql” => false,
];
register_taxonomy( “verwarming”, [ “woning” ], $args );/**
* Taxonomy: Isolatie.
*/$labels = [
“name” => esc_html__( “Isolatie”, “starchild” ),
“singular_name” => esc_html__( “Isolatie”, “starchild” ),
“menu_name” => esc_html__( “Isolatie”, “starchild” ),
“all_items” => esc_html__( “All Isolatie”, “starchild” ),
“edit_item” => esc_html__( “Edit Isolatie”, “starchild” ),
“view_item” => esc_html__( “View Isolatie”, “starchild” ),
“update_item” => esc_html__( “Update Isolatie name”, “starchild” ),
“add_new_item” => esc_html__( “Add new Isolatie”, “starchild” ),
“new_item_name” => esc_html__( “New Isolatie name”, “starchild” ),
“parent_item” => esc_html__( “Parent Isolatie”, “starchild” ),
“parent_item_colon” => esc_html__( “Parent Isolatie:”, “starchild” ),
“search_items” => esc_html__( “Search Isolatie”, “starchild” ),
“popular_items” => esc_html__( “Popular Isolatie”, “starchild” ),
“separate_items_with_commas” => esc_html__( “Separate Isolatie with commas”, “starchild” ),
“add_or_remove_items” => esc_html__( “Add or remove Isolatie”, “starchild” ),
“choose_from_most_used” => esc_html__( “Choose from the most used Isolatie”, “starchild” ),
“not_found” => esc_html__( “No Isolatie found”, “starchild” ),
“no_terms” => esc_html__( “No Isolatie”, “starchild” ),
“items_list_navigation” => esc_html__( “Isolatie list navigation”, “starchild” ),
“items_list” => esc_html__( “Isolatie list”, “starchild” ),
“back_to_items” => esc_html__( “Back to Isolatie”, “starchild” ),
“name_field_description” => esc_html__( “The name is how it appears on your site.”, “starchild” ),
“parent_field_description” => esc_html__( “Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.”, “starchild” ),
“slug_field_description” => esc_html__( “The slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.”, “starchild” ),
“desc_field_description” => esc_html__( “The description is not prominent by default; however, some themes may show it.”, “starchild” ),
];$args = [
“label” => esc_html__( “Isolatie”, “starchild” ),
“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’ => ‘isolatie’, ‘with_front’ => true, ],
“show_admin_column” => false,
“show_in_rest” => true,
“show_tagcloud” => false,
“rest_base” => “isolatie”,
“rest_controller_class” => “WP_REST_Terms_Controller”,
“rest_namespace” => “wp/v2”,
“show_in_quick_edit” => false,
“sort” => false,
“show_in_graphql” => false,
];
register_taxonomy( “isolatie”, [ “woning” ], $args );/**
* Taxonomy: Tuintype(n).
*/$labels = [
“name” => esc_html__( “Tuintype(n)”, “starchild” ),
“singular_name” => esc_html__( “Tuintype”, “starchild” ),
“menu_name” => esc_html__( “Tuintype(n)”, “starchild” ),
“all_items” => esc_html__( “All Tuintype(n)”, “starchild” ),
“edit_item” => esc_html__( “Edit Tuintype”, “starchild” ),
“view_item” => esc_html__( “View Tuintype”, “starchild” ),
“update_item” => esc_html__( “Update Tuintype name”, “starchild” ),
“add_new_item” => esc_html__( “Add new Tuintype”, “starchild” ),
“new_item_name” => esc_html__( “New Tuintype name”, “starchild” ),
“parent_item” => esc_html__( “Parent Tuintype”, “starchild” ),
“parent_item_colon” => esc_html__( “Parent Tuintype:”, “starchild” ),
“search_items” => esc_html__( “Search Tuintype(n)”, “starchild” ),
“popular_items” => esc_html__( “Popular Tuintype(n)”, “starchild” ),
“separate_items_with_commas” => esc_html__( “Separate Tuintype(n) with commas”, “starchild” ),
“add_or_remove_items” => esc_html__( “Add or remove Tuintype(n)”, “starchild” ),
“choose_from_most_used” => esc_html__( “Choose from the most used Tuintype(n)”, “starchild” ),
“not_found” => esc_html__( “No Tuintype(n) found”, “starchild” ),
“no_terms” => esc_html__( “No Tuintype(n)”, “starchild” ),
“items_list_navigation” => esc_html__( “Tuintype(n) list navigation”, “starchild” ),
“items_list” => esc_html__( “Tuintype(n) list”, “starchild” ),
“back_to_items” => esc_html__( “Back to Tuintype(n)”, “starchild” ),
“name_field_description” => esc_html__( “The name is how it appears on your site.”, “starchild” ),
“parent_field_description” => esc_html__( “Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.”, “starchild” ),
“slug_field_description” => esc_html__( “The slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.”, “starchild” ),
“desc_field_description” => esc_html__( “The description is not prominent by default; however, some themes may show it.”, “starchild” ),
];$args = [
“label” => esc_html__( “Tuintype(n)”, “starchild” ),
“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’ => ‘tuintype’, ‘with_front’ => true, ],
“show_admin_column” => false,
“show_in_rest” => true,
“show_tagcloud” => false,
“rest_base” => “tuintype”,
“rest_controller_class” => “WP_REST_Terms_Controller”,
“rest_namespace” => “wp/v2”,
“show_in_quick_edit” => false,
“sort” => false,
“show_in_graphql” => false,
];
register_taxonomy( “tuintype”, [ “woning” ], $args );/**
* Taxonomy: Voorzieningen sanitair.
*/$labels = [
“name” => esc_html__( “Voorzieningen sanitair”, “starchild” ),
“singular_name” => esc_html__( “Voorziening sanitair”, “starchild” ),
“menu_name” => esc_html__( “Voorzieningen sanitair”, “starchild” ),
“all_items” => esc_html__( “All Voorzieningen sanitair”, “starchild” ),
“edit_item” => esc_html__( “Edit Voorziening sanitair”, “starchild” ),
“view_item” => esc_html__( “View Voorziening sanitair”, “starchild” ),
“update_item” => esc_html__( “Update Voorziening sanitair name”, “starchild” ),
“add_new_item” => esc_html__( “Add new Voorziening sanitair”, “starchild” ),
“new_item_name” => esc_html__( “New Voorziening sanitair name”, “starchild” ),
“parent_item” => esc_html__( “Parent Voorziening sanitair”, “starchild” ),
“parent_item_colon” => esc_html__( “Parent Voorziening sanitair:”, “starchild” ),
“search_items” => esc_html__( “Search Voorzieningen sanitair”, “starchild” ),
“popular_items” => esc_html__( “Popular Voorzieningen sanitair”, “starchild” ),
“separate_items_with_commas” => esc_html__( “Separate Voorzieningen sanitair with commas”, “starchild” ),
“add_or_remove_items” => esc_html__( “Add or remove Voorzieningen sanitair”, “starchild” ),
“choose_from_most_used” => esc_html__( “Choose from the most used Voorzieningen sanitair”, “starchild” ),
“not_found” => esc_html__( “No Voorzieningen sanitair found”, “starchild” ),
“no_terms” => esc_html__( “No Voorzieningen sanitair”, “starchild” ),
“items_list_navigation” => esc_html__( “Voorzieningen sanitair list navigation”, “starchild” ),
“items_list” => esc_html__( “Voorzieningen sanitair list”, “starchild” ),
“back_to_items” => esc_html__( “Back to Voorzieningen sanitair”, “starchild” ),
“name_field_description” => esc_html__( “The name is how it appears on your site.”, “starchild” ),
“parent_field_description” => esc_html__( “Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.”, “starchild” ),
“slug_field_description” => esc_html__( “The slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.”, “starchild” ),
“desc_field_description” => esc_html__( “The description is not prominent by default; however, some themes may show it.”, “starchild” ),
];$args = [
“label” => esc_html__( “Voorzieningen sanitair”, “starchild” ),
“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’ => ‘voorziening_sanitair’, ‘with_front’ => true, ],
“show_admin_column” => false,
“show_in_rest” => true,
“show_tagcloud” => false,
“rest_base” => “voorziening_sanitair”,
“rest_controller_class” => “WP_REST_Terms_Controller”,
“rest_namespace” => “wp/v2”,
“show_in_quick_edit” => false,
“sort” => false,
“show_in_graphql” => false,
];
register_taxonomy( “voorziening_sanitair”, [ “woning” ], $args );/**
* Taxonomy: Ligging.
*/$labels = [
“name” => esc_html__( “Ligging”, “starchild” ),
“singular_name” => esc_html__( “Ligging”, “starchild” ),
“menu_name” => esc_html__( “Ligging”, “starchild” ),
“all_items” => esc_html__( “All Ligging”, “starchild” ),
“edit_item” => esc_html__( “Edit Ligging”, “starchild” ),
“view_item” => esc_html__( “View Ligging”, “starchild” ),
“update_item” => esc_html__( “Update Ligging name”, “starchild” ),
“add_new_item” => esc_html__( “Add new Ligging”, “starchild” ),
“new_item_name” => esc_html__( “New Ligging name”, “starchild” ),
“parent_item” => esc_html__( “Parent Ligging”, “starchild” ),
“parent_item_colon” => esc_html__( “Parent Ligging:”, “starchild” ),
“search_items” => esc_html__( “Search Ligging”, “starchild” ),
“popular_items” => esc_html__( “Popular Ligging”, “starchild” ),
“separate_items_with_commas” => esc_html__( “Separate Ligging with commas”, “starchild” ),
“add_or_remove_items” => esc_html__( “Add or remove Ligging”, “starchild” ),
“choose_from_most_used” => esc_html__( “Choose from the most used Ligging”, “starchild” ),
“not_found” => esc_html__( “No Ligging found”, “starchild” ),
“no_terms” => esc_html__( “No Ligging”, “starchild” ),
“items_list_navigation” => esc_html__( “Ligging list navigation”, “starchild” ),
“items_list” => esc_html__( “Ligging list”, “starchild” ),
“back_to_items” => esc_html__( “Back to Ligging”, “starchild” ),
“name_field_description” => esc_html__( “The name is how it appears on your site.”, “starchild” ),
“parent_field_description” => esc_html__( “Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.”, “starchild” ),
“slug_field_description” => esc_html__( “The slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.”, “starchild” ),
“desc_field_description” => esc_html__( “The description is not prominent by default; however, some themes may show it.”, “starchild” ),
];$args = [
“label” => esc_html__( “Ligging”, “starchild” ),
“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’ => ‘ligging’, ‘with_front’ => true, ],
“show_admin_column” => false,
“show_in_rest” => true,
“show_tagcloud” => false,
“rest_base” => “ligging”,
“rest_controller_class” => “WP_REST_Terms_Controller”,
“rest_namespace” => “wp/v2”,
“show_in_quick_edit” => false,
“sort” => false,
“show_in_graphql” => false,
];
register_taxonomy( “ligging”, [ “woning” ], $args );
}
add_action( ‘init’, ‘cptui_register_my_taxes’ );`
`Hmm, nothing obvious still.
Have you reached out to WPML support at all about this, with the information being that moving registration from being handled to a plugin, to your theme’s functions.php file causing oddities?
The only way I can think that having some effect on this is load order, where CPTUI’s
inithook setup is being found earlier than it is from the functions.php file.Curious what they’d have to say about this, and if they say something needs done on our end, then we’ll happily try to figure out a solution still.
Any news or changes here @ispacecrusader ?
Hi Michael,
I’ve been having contact with WPML support about that. For some reason, they could not access my staging site, no matter what we tried. Yesterday, I closed the support ticket, as it was costing too much time. I decided to just keep the plugin active and live with it.
The topic ‘Code export to theme loses WPML translation connection’ is closed to new replies.