Problème : Vous travaillez sur un site avec traduction automatique à 100% et vous avez plusieurs Custom Post Types (CPT) dont vous voulez que tous les champs soient traduits sauf le titre du post. Vous ne savez pas comment interdire la traduction du titre d'un post tout en traduisant les autres champs. Solution : Pour ne pas traduire le titre d'un post tout en traduisant les autres champs, vous devez utiliser un code personnalisé. Appliquez le code suivant à chaque type de publication personnalisé en l'ajustant selon vos besoins :
$value ) {
if ( isset( $value->field_type ) && 'title' === $value->field_type ) {
// Ne pas traduire le titre + copier la valeur originale.
$value->field_translate = 0;
$value->field_data_translated = $value->field_data;
}
}
return $fields;
}
Pour les autres champs, conservez simplement leur configuration actuelle (comme traduisibles). Si cette solution ne s'applique pas à votre cas ou semble obsolète, nous vous recommandons de vérifier les problèmes connus, de vérifier la version du correctif permanent et de confirmer que vous avez installé les dernières versions des thèmes et plugins. Si le problème persiste, n'hésitez pas à ouvrir un nouveau ticket de support sur notre forum d'assistance.
Problem: You are trying to translate the slug for a custom post type (CPT) called 'book'. The slug should be 'book' for the single template and 'books' for the archive template. You have followed the instructions from the WPML documentation but cannot find the option in WPML settings to translate the archive slug, as the settings only provide a field for the singular slug. Solution: We currently do not support the direct translation of archive slugs for custom post types due to technical limitations. However, we recommend a workaround which you can find detailed in our forum: https://wpml.org/forums/topic/custom-post-type-via-acf-archive-translation/#post-16830228.
If this solution does not apply to your case, or if it seems outdated, please open a new support ticket. We also highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, you can contact us directly through our support forum.
Problem: The client would like to lower the amount of HTTP requests, due to each language flag being loaded as an individual SVG file. This results in multiple HTTP requests, which increase Time To First Byte (TTFB) and initial rendering time, particularly affecting visitors on slower networks.
Solution: We have forwarded a feature request to load SVGs programatically instead of using SVG files, which is currently under revision. You can find a custom solution approach for the issue inside the comments of this ticket.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.
Problem: The WPML language switcher only appears on the homepage and does not function on other pages, including a Russian page. The client is using a custom theme. Solution: If you're experiencing this issue, we recommend adding a custom language switcher or using a shortcode or hook/filter. Ensure that: 1. The template where the language switcher is added is translated. 2. The pages where the language switcher should appear are translated and published. We suggest checking the following guides for detailed instructions:
If after ensuring all content is translated and published the issue persists, test with a standard theme to check for conflicts in your custom theme's coding.
Please note that the solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket.
Problem: إذا كنت تواجه مشكلة في ظهور تكرار في اسم اللغة وبعض الرموز الغريبة في محول اللغات المضاف إلى القائمة، فقد يكون ذلك بسبب تعارض مع إضافة Unlimited Addons For Elementor أو Animation Addons for Elementor. Solution: أولاً، جرب إضافة محول اللغة مباشرة على الرأسية بدلاً من استخدام الطريقة القديمة. إذا كنت تستخدم Animation Addons for Elementor، قد تحتاج إلى تعديل الكود في الملف
إذا لم تحل هذه الخطوات المشكلة، فنحن نوصي بالتواصل مع فريق دعم Animation Addons for Elementor لمعالجة التعارض. كما نوصي بزيارة صفحة المشاكل المعروفة للتحقق من وجود مشاكل معروفة والتأكد من أنك تستخدم أحدث إصدارات الإضافات والقوالب. إذا استمرت المشكلة، يرجى فتح تذكرة دعم جديدة.
Problem: The client is experiencing an issue where a custom post type 'projekt' displays duplicate entries in a secondary language (Swedish) despite setting the language parameter in WP_Query. The query fetches posts from both the default (Polish) and secondary language, leading to content duplication on the Swedish page. Solution: We recommended removing the 'lang' => $current_lang from the WP_Query and testing without it. If the issue persists, it might be related to other parts of the custom code. We advised testing the issue in a minimal environment using a default WordPress theme and only essential plugins to confirm if the problem is related to WPML or the custom code. Additionally, we provided a working code example for querying WooCommerce products to demonstrate a similar setup that functions correctly. If the problem continues, further debugging of the custom code or consultation with a developer might be necessary.
Please note that this solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket at WPML support forum.