Problem: If you're experiencing issues with the styling of your custom language switcher, specifically with the "Hover" settings for "Other language font color" and "Other language background color" not working as expected on the frontend, this might be due to a CSS conflict or misconfiguration. The hover effect might be incorrectly applied to the current language instead of the available translation links. Solution: We recommend applying custom CSS to correct this issue. You can add the necessary CSS by navigating to WP > Appearance > Customize > Additional CSS in your WordPress dashboard.
.wpml-ls-statics-shortcode_actions a, .wpml-ls-statics-shortcode_actions .wpml-ls-sub-menu a, .wpml-ls-statics-shortcode_actions .wpml-ls-sub-menu a:link, .wpml-ls-statics-shortcode_actions li:not(.wpml-ls-current-language) .wpml-ls-link, .wpml-ls-statics-shortcode_actions li:not(.wpml-ls-current-language) .wpml-ls-link:link {
color: #000000;
background-color: #ffb536;
}
If this solution does not resolve your issue or seems irrelevant because it might be outdated or not applicable to your 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 problem persists, please open a new support ticket at WPML support forum for further assistance.
Problem: When translating your website automatically, some pages do not translate at all and do not appear in the new language. Additionally, the translate menu option is missing in the page section, unlike other websites. However, posts translate without any issues. Solution: We found a PHP error in the theme file that was causing the issue. The function was returning a WP_Error, which the theme did not validate before outputting. To resolve this, we replaced the problematic code in
If this solution does not apply to your case, or if it seems outdated, we recommend opening 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, please visit our support forum at WPML Support Forum.
Problem: You are experiencing an issue where WPML is not filtering WooCommerce product categories by language on the frontend. All categories from all languages (Greek, English, Bulgarian) are showing together in category widgets and menus.
Solution: We recommend adding
suppress_filters=0
or
suppress_filters = false
to the arguments in your
get_terms()
function to ensure that taxonomy queries return results only in the currently viewed language. For more details on how to implement this, please refer to our documentation on achieving WPML compatibility for themes and plugins: Filter Correct IDs.
Please note that this solution might be irrelevant if it's 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 for further assistance.
Problema: El cliente necesita que WPML resuelva y muestre la traducción correcta cuando se utiliza el slug del idioma original en el dominio del idioma secundario. Solución: No existe una configuración nativa en WPML para este comportamiento. Se requiere una solución personalizada que implemente una lógica de fallback para redirigir (301) cuando se accede a un slug del idioma original en el dominio del idioma secundario. Los pasos son: 1. Detectar el slug solicitado. 2. Buscar si ese slug existe en el idioma original (ES). 3. Si existe, obtener el ID de la traducción en el idioma secundario (EN) y hacer una redirección 301 al permalink canónico en EN. Este enfoque es consistente con SEO, evita contenido duplicado y no interfiere con la resolución estándar de WordPress/WPML. Los hooks útiles incluyen
template_redirect
y varios de WPML como
wpml_object_id
,
wpml_element_trid
, y
wpml_get_element_translations
. Aquí tienes un ejemplo de código que puedes adaptar y probar:
Para más detalles sobre los hooks de WPML, visita WPML Hooks Reference. Si esta solución no resuelve tu problema o si la información parece desactualizada, te recomendamos abrir un nuevo ticket de soporte en el foro de soporte de WPML. También es aconsejable revisar los problemas conocidos y confirmar que tienes instaladas las últimas versiones de los temas y plugins.
Problem: The client has a custom post type called 'resources' with an accompanying custom Gutenberg block called 'resource feed'. This block is dynamic and displays data from entries in the feed. However, it does not display different content based on the selected language, showing the same content across all languages. Solution: We recommend using the
wpml_object_id
hook to ensure that the
$post_id
refers to the translated post in the currently active language. Here is how you can implement it:
// will return the post ID in the current language for post ID 1
echo apply_filters( 'wpml_object_id', 1, 'post' );
// will return the category ID in the current language for category ID 4. If the translation is missing it will return the original (here: category ID 4)
echo apply_filters( 'wpml_object_id', 4, 'category', TRUE );
// will return the German attachment ID for attachment ID 25. If the translation is missing it will return NULL
echo apply_filters( 'wpml_object_id', 25, 'attachment', FALSE, 'de' );
If this solution does not resolve your issue or seems outdated, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. We highly recommend opening a new support ticket for further assistance at WPML support forum.
Problem: If you're experiencing issues where internal links added to images in Elementor are not translatable or editable in the WPML side-by-side editor, preventing the creation of fully functional translated pages. Solution: 1. **Search for the links in the Advanced Translation Editor** Open the page translation in the Advanced Translation Editor and use the search bar to locate common link elements. This might reveal the image URLs that were not immediately obvious.
2. **Update the WPML configuration** If the links are still not editable, you might need to update your WPML configuration. Add the following XML configuration to your site:
If this solution does not resolve your issue, or if it seems outdated or not applicable to your 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 needed, please open a new support ticket at https://wpml.org/forums/forum/english-support/ for further assistance.
Problem: The client was experiencing an issue where some translated content was not displaying on the front end of a WooCommerce product page. The content was managed via the Gutenberg editor and involved a shortcode. Despite the content being visible in the Advanced Translation Editor, it was not rendered on the front end for certain tabs. Solution: We discovered that the issue was due to the [GK-TABS-BREAK] being mistakenly treated as a real shortcode during translation, which led to its duplication and subsequently broke the tab layout. To resolve this, we modified the code in the theme's shortcode file. Here are the steps we took:
Made a minor edit in the default language product to trigger a retranslation.
Completed the translation in the WPML Advanced Translation Editor.
This solution resolved the issue, and the translated content now displays correctly on the front end. However, please be aware that this fix might become irrelevant due to future updates to the theme or WPML. If you encounter similar issues or if this solution does not work for you, we 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 problem persists, please open a new support ticket.