Home › Forums › WoodMart support forum › Сhange the language on a category page
Сhange the language on a category page
- This topic has 10 replies, 2 voices, and was last updated 2 months, 3 weeks ago by
Luke Nielsen.
-
AuthorPosts
-
May 28, 2025 at 2:58 pm #663827
edgarskairansParticipantHello.
I have the following problem: when I change the language on a category page using the WPML plugin, it opens the wrong page. For example, if I’m on /phone-en/ and switch the language to /phone-fr/, everything works correctly. But if I’m on a subcategory like /phone-en/android-en/, it should logically open /phone-fr/android-fr/ when switching languages. However, it just redirects to /phone-fr/ instead.
It seems like the language switcher only works correctly on the main category level and not on subcategories.
Could you please help me solve this problem?
Thanks
Best RegardsMay 28, 2025 at 2:59 pm #663830
edgarskairansParticipant+ private content
May 28, 2025 at 4:55 pm #663868
Luke NielsenKeymasterHello,
Could you please check how it works with some default WordPress themes like TwentyTwenty or WooCommerce Storefront to understand is it our theme issue or not?
Kind Regards
May 28, 2025 at 6:11 pm #663894
edgarskairansParticipantHello,
I tried the TwentyTwenty theme, and everything worked as it should — when switching the language, it opened the same category that was previously open.
Thanks
Best RegardsMay 29, 2025 at 9:30 am #663951
Luke NielsenKeymasterHello,
I have checked it on your end and it works well, here is a video – https://dropmefiles.com.ua/en/4K6s38
https://prnt.sc/9WCyV3GsN-aU -> https://prnt.sc/F0CjiIJTl8vJ -> https://prnt.sc/C4UZaOU3GVIP
Kind Regards
May 29, 2025 at 9:58 am #663955
edgarskairansParticipantHello
It used to work for me sometimes too — it’s probably an exception. I just tried it again, and it’s not working for me. I cleared the cache, but it still doesn’t work. I added a link with a large number of subcategories. Please open it and try switching between languages and categories.
Thanks
Best RegardsMay 29, 2025 at 10:10 am #663958
Luke NielsenKeymasterOkay, I see. It happens on my side only once when I first visit the category. May I check how it works on the default theme?
Kind Regards
May 29, 2025 at 10:50 am #663972
edgarskairansParticipantYes, of course.
I tried to reproduce the bug on the TwentyTwenty theme, but I couldn’t.
May 29, 2025 at 3:38 pm #664035
Luke NielsenKeymasterHello,
You use the AJAX Shop functionality, in this case, when the subcategory page is loaded via AJAX and you change the language it will redirect you to all categories. If you do not want such behaviur, you can disable the AJAX Shop via Theme Settings -> Product archive – https://prnt.sc/5fZCSJvyaTWP
Kind Regards
May 30, 2025 at 10:02 am #664136
edgarskairansParticipantHello.
But this is not the correct functionality — how can I disable AJAX for categories but keep it enabled for everything else?
Thanks
Best RegardsMay 30, 2025 at 11:02 am #664147
Luke NielsenKeymasterHello,
Unfortunately, there is no way to disable it for the specific categories as it applies to the shop globally.
If you have any additional questions, let me know.
Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register