Navigation überspringen

Dieses Thema enthält 0 Antworten, hat 1 Stimme.

Zuletzt aktualisiert von nathanY Vor 2 Wochen, 1 Tag.

Assistiert von: Lucas Vidal de Andrade.

Verfasser Beiträge
Oktober 23, 2024 unter 1:03 pm #16321930

nathanY

Background of the issue:
I am currently using WPML on my WordPress site, which includes a custom post type called products. My goal is to prevent specific product titles from being translated across the entire site. I have added the following code to my theme's functions.php file: get_var($wpdb->prepare("SELECT `field_data` FROM `wp_icl_translate` WHERE `field_type` = 'original_id' AND `job_id` = %d", $job_translate["job_id"])); // Check the post type $posttype = get_post_type($postid); // If the post type is 'products', exclude the title from translation if ($job_translate["field_type"] == "title" && $posttype == "products") { return false; // do not translate the title } // Default behavior return $is_translatable; } ?>

Symptoms:
Despite the above implementation, the product titles are still being translated by WPML, which is contrary to my requirements.

Questions:
Could you please assist me in troubleshooting this issue?
Are there alternative methods or settings that need to be configured to exclude product titles from being translated?

Dieses Ticket ist jetzt geschlossen. Wenn Sie ein WPML Kunde sind und Hilfe benötigen, eröffnen Sie bitte ein neues Support-Ticket.