This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
5:00 – 13:00 | 5:00 – 13:00 | 5:00 – 13:00 | 5:00 – 13:00 | 5:00 – 13:00 | - | - |
- | - | - | - | - | - | - |
Supporter timezone: Africa/Cairo (GMT+02:00)
This topic contains 4 replies, has 1 voice.
Last updated by daniellaR-2 22 hours, 28 minutes ago.
Assisted by: Osama Mersal.
Author | Posts |
---|---|
March 23, 2025 at 4:07 pm #16848984 | |
daniellaR-2 |
Background of the issue: Symptoms: Questions: |
March 23, 2025 at 4:08 pm #16849013 | |
daniellaR-2 |
Hi, can you please add matt@squidd.co.uk to this ticket for updates and notifications. |
March 24, 2025 at 10:15 am #16851023 | |
daniellaR-2 |
Hi, can I get a update on this please. We are due to go live with the German version of the website ASAP. |
March 25, 2025 at 2:03 am #16854488 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Thanks for contacting WPML forums support. I'll be glad to help you today. First of all, sorry for the late reply; it was due to a higher workload. 1) I'm afraid we can't add emails to the ticket, as our system automatically sends replies to the email in your wpml.org account. 2) Please let me know how this menu is created and translated. Do you use a plugin for the mega menu? Best regards, |
March 25, 2025 at 8:54 am #16855446 | |
daniellaR-2 |
Hi Osama, Our nav is implemented using this code: <div class="nav--main__wrap <?php if (is_product()) : ?>nav--product <?php endif; ?>cf"> There is no translation to German in the Menu menu as per the attached screenshots. |
March 25, 2025 at 5:38 pm #16859319 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Thanks for your update. I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP) Your answer will be private, meaning only you and I can access it. ❌ Please back up your database and website ❌ ✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical. ✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site. Best regards, |
March 26, 2025 at 5:00 pm #16864504 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Thanks for the access details. I created a German menu, but I couldn't find the code for the mega menu. (hidden link) In order to translate the menus, please go to WPML-> WP Menu Sync, sync the menus, edit the translated menus in Appearance-> Menus, and save them. Best regards, |
March 26, 2025 at 9:34 pm #16865677 | |
daniellaR-2 |
Thanks for all your help so far Osama I really appreciate it, The code for the MegaMenu is here \themes\centriforce\includes\walkers\Centrforce_MegaMenu.php: <?php class Centriforce_MegaMenu extends Walker_Nav_Menu $classes = $item->classes; $output .= ""; if ($depth > 0 && !is_int(array_search('stackable', $classes))) : return $output; function start_el(&$output, $item, $depth = 0, $args = [], $id = 0) if ($depth > 0) : $output .= "<li class='" . implode(" ", $classes) . "'>"; //Replace page-anchors with a span $output .= $item->title; //Close page-anchors with a span //Load category products private function _render_submenu_products($item) if (count($products->posts)) : wp_reset_query(); So I can see that the product categories are added but these are still pointing to the wrong URL i.e. hidden link instead of hidden link And obviously the products under each category are not displaying. |
March 27, 2025 at 3:43 am #16866011 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, 1) The URL (hidden link) is redirected to the page URL (hidden link). This also happens to the English product URL. (hidden link) 2) I installed a local copy of your site to check the issue further and deleted the "Centriforce_MegaMenu.php" file, but the megamenu still appeared in English correctly. (Kindly check this hidden link">screenshot) Please empty this file on your site and check the megamenu. Kindly note that supporting custom themes is out of our support scope. Please check our support policy. Best regards, |
March 27, 2025 at 9:44 am #16867205 | |
daniellaR-2 |
Thanks Osama, The megamenu is actually in this file \themes\centriforce_new\includes\walkers\Centrforce_MegaMenu.php. I have updated the code so it is language aware now: private function _render_submenu_products($item) $args = array( // Set language before query $products = new WP_Query($args); if (count($products->posts)) : $output .= '<li class="sub-menu-product">' wp_reset_query(); To summarise, the Mega Menu works fine in the English version but not the German version where it is not displaying products. I will use this product (Stokbord® Sheet - Embossed) as an example: hidden link When I look in the Categories section (see screenshot) I can see it assigned the Product category of Stokbord. Using the WPML Translation Editor there is no way of ensuring the correct Category is assigned to the Product in German. I assume this uses the Taxonomy translations (screenshot attached) However, when I visit this page: (see screenshot) And click on the pencil icon for the German translation of Stokbord, the screen shows the slug as stokbord-de. If i change this to stokbord it saves but changes it back. If you visit this page: It is a correctly rendered version of the Stokbord brand page which uses the brand.php page template. However clicking on the Produkte -> Stokbord menu option navigates you to : hidden link Which is the incorrect page and uses the woocommerce product-cat.php template. |