Problem: You are using WP-CLI to list all media IDs in the trash across all languages but the command only returns media IDs for the main language. Solution: We have identified two potential workarounds to include media IDs from all languages: 1) Use the WP-CLI parameter
--suppress_filters=true
which allows the command to work across all languages. 2) Use the parameter
--url="https://yourwebsite.com/en"
to force WP-CLI to work in the language based on the URL.
Additionally, our 2nd Tier Support suggests modifying the code in
function with the following code to include a condition that checks for the 'lang' parameter in the query:
public function posts_where_filter( $where, $query ) {
if ( $query === null || $this->where_filter_active( $query ) === false ) {
return $where;
}
$requested_id = isset( $_REQUEST['attachment_id'] ) && $_REQUEST['attachment_id'] ? $_REQUEST['attachment_id'] : false;
$requested_id = isset( $_REQUEST['post_id'] ) && $_REQUEST['post_id'] ? $_REQUEST['post_id'] : $requested_id;
$requested_id = (int) $requested_id;
$default_language = $this->sitepress->get_default_language();
$post_language = $this->post_translations->get_element_lang_code( $requested_id );
if (isset($query->query["lang"])) {
$post_language = $query->query["lang"];
$requested_id = "1"; //hack needed because then $current_language will not get the $post_language, but will call for get_current_language
}
$current_language = $requested_id && $post_language ? $post_language : $this->sitepress->get_current_language();
$condition = $current_language === 'all' ? $this->all_langs_where() : $this->specific_lang_where( $current_language, $default_language );
$where .= $condition;
return $where;
}
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 these solutions do not resolve your issue, please open a new support ticket at WPML support forum.
Problem: You have created a custom post type (CPT) with the slug 'event' using the ACF Pro plugin and defined a custom archive slug 'events'. You have translated the base default slug 'event' to 'événement' in French via WPML > Settings > Post Types Translation, but you are unable to find where to translate the archive slug. Solution: Currently, WPML does not support the translation of custom slugs set in the
has_archive
option for custom post types. You can read more about this limitation here. We recommend enabling the archive option and leaving the slug field empty for custom post types created with ACF. This approach uses the default slug, and when you switch languages, the translated slug set in "WPML > Settings > Post Type Translation" will display.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please open a new support ticket at WPML support forum.
Problem: The client needed a way to customize the ALT text for flag images in the WPML language switcher to improve accessibility and comply with WCAG 1.1.1, without modifying WPML core files. Solution: We advised the client that currently, the best approach to achieve the desired ALT text customization is to follow the workaround provided in our errata, which involves modifying the 'class-wpml-ls-model-build.php' file.
Unfortunately, there are no suitable hooks or filters available for this customization, and implementing custom code would be complex. We also informed the client that there is no ETA for a permanent fix but have taken their feedback as a feature request. We recommended trying the workaround after ensuring a site backup.
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 this does not resolve your issue, please open a new support ticket at WPML support forum.
Problema: Stai utilizzando l'API REST di WooCommerce per tradurre le categorie di prodotti sul tuo sito. Quando tenti di tradurre una sottocategoria, la traduzione funziona, ma non è collegata alla categoria principale tradotta. Ti chiedi se 'translation_of' sia il parametro corretto da usare nella chiamata API per collegare la traduzione alla categoria principale. Soluzione: Al momento non esiste un modo per sincronizzare le gerarchie delle categorie tradotte programmaticamente tramite l'API. Tuttavia, puoi esplorare la classe
e scrivere del codice personalizzato per gestire questa sincronizzazione. Se necessiti di assistenza nello sviluppo, ti consigliamo di consultare uno dei nostri contractor. Se questa soluzione non risulta pertinente, potrebbe essere perché è obsoleta o non applicabile al tuo caso. Ti consigliamo di verificare i problemi noti, controllare la versione della correzione permanente e confermare di avere installato le ultime versioni dei temi e dei plugin. Se il problema persiste, ti invitiamo a aprire un nuovo ticket di supporto.
Problem: The client is using WPML with the Gravity Forms Multilingual plugin and is facing an issue where form entries cannot be translated. While form labels and sub-labels are translatable, the received submissions cannot be translated natively or during export. Solution: Currently, WPML does not support the translation of form entries directly. We recommend adding a hidden field to collect the language code when the form is submitted. This allows filtering submissions by language. For translating the content of form entries, the client might consider implementing a custom function using the Google Translate API, as WPML does not provide a native solution for this.
If this solution does not fully address your issue or seems outdated, please check the related known issues and confirm that you have installed the latest versions of themes and plugins. If further assistance is needed, we highly recommend opening a new support ticket here.
Problem: The client is working on a site using WPML's Advanced Translation Editor (ATE) and is facing difficulties managing long pages without certain functionalities. Specifically, they need a filter to display only non-translated strings and a 'validate all' button for strings marked in yellow/orange that require validation. Solution: We have acknowledged the client's request for these functionalities and have forwarded it to our development team for consideration in future updates. If you're experiencing similar issues, we recommend checking our known issues page and ensuring you have the latest versions of themes and plugins installed. If the problem persists or the solution provided here is outdated or not applicable to your case, please open a new support ticket with us for further assistance. Contact WPML support