Problem: You want to create an overview on your website using WPML to see the original page and all connected pages with their translated slugs, organized in columns. Solution: We recommend developing a new functionality with custom code. Although creating custom code solutions falls outside our support scope, you can explore our hooks that might help you achieve this. Please check the WPML Hooks Reference for potential solutions.
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. Should you need further assistance, please do not hesitate to open a new support ticket or visit our support forum at WPML Support Forum.
Problem: If you're experiencing issues where changing a product's status to 'draft' in the default language (Italian) does not automatically sync the status to additional languages (English/Chinese) on your multilingual site, we have a solution for you. Solution: We recommend adding a custom code snippet to your theme's functions.php file to synchronize the publish status across all languages. Here's how you can do it:
function sync_publish_status_across_languages($post_id) {
// Check if this is a valid post type (product) and that the post is not being autosaved
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return;
if ('product' != get_post_type($post_id)) return; // Check for WooCommerce product post type
// Get the current post status
$post_status = get_post_status($post_id);
// Get the default language
$default_language = apply_filters('wpml_default_language', null);
// Get all translations of the post in different languages
$translations = apply_filters('wpml_get_element_translations', null, $post_id, 'product'); // Updated for products
foreach ($translations as $lang => $translation) {
// Skip the default language post (we don't want to update it)
if ($lang === $default_language) continue;
// Get the translation post ID
$translation_post_id = $translation->element_id;
// Update the publish status of the translated post
wp_update_post(array(
'ID' => $translation_post_id,
'post_status' => $post_status
));
}
}
add_action('save_post', 'sync_publish_status_across_languages');
Please note that this solution might be outdated or not applicable to your specific case. If this does not resolve your issue, 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 you still need assistance, please open a new support ticket at WPML support forum.
Problem: The client reported issues with incomplete or missing translations on their website using WPML. Solution: We recommended adding a custom XML configuration to ensure all elements are translatable. The client can access this setting by navigating to the WPML settings in their WordPress admin panel. After updating the XML configuration, the client should resave the primary language page to trigger the automatic translation process. For the footer translations, we enabled the translation option, and the client needs to complete the translation manually.
If this solution does not resolve your issue, or if it seems outdated or irrelevant 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 further assistance is needed, please open a new support ticket at WPML support forum.
Problem: Die Funktion zur Anzeige von Herstellerangaben auf einer Produktseite wird nicht korrekt ins Englische übersetzt, obwohl die Grundversion in Deutsch verfasst ist. Der String ist vorhanden, aber die Sprachen sind vertauscht. Solution: Wir empfehlen, die
getText()
Funktion mit der korrekten Textdomain zu implementieren, da diese in Ihrer aktuellen Implementierung fehlt. Zusätzlich können Sie die Funktion wpml_translate_single_string verwenden, um die Übersetzung zu verwalten.
Falls diese Lösung nicht relevant sein sollte, weil sie veraltet ist oder nicht auf Ihr Problem zutrifft, empfehlen wir Ihnen, ein neues Support-Ticket zu eröffnen. Wir empfehlen auch, die Seite mit bekannten Problemen (https://wpml.org/known-issues/) zu überprüfen, die Version der dauerhaften Lösung zu verifizieren und zu bestätigen, dass Sie die neuesten Versionen von Themes und Plugins installiert haben. Für weitere Unterstützung besuchen Sie bitte unser Support-Forum unter WPML Support-Forum.