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.
Tagged: Documentation request, Exception
This topic contains 4 replies, has 2 voices.
Last updated by Bobby 1 year, 11 months ago.
Assisted by: Bobby.
Author | Posts |
---|---|
July 18, 2023 at 8:52 am #14056529 | |
monih |
I want the user to redirect to homepage if he click on language flag on category that not translated. In the language switcher i set to redirect to homepage if there is no translation The site default language is Hebrew and the translation is in English. You can see it live here (this is a Hebrew category that not translated to English): Please help. Thanks |
July 18, 2023 at 7:35 pm #14061891 | |
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
Hi Moni, This is happening because the category has an existing translation for English, this feature will only work if the category has no translation to English. (even if it is not translated it looks like the translation page has been created for English for that category) hidden link You would need to remove the translation of the category. If you don't need to translate your categories, at first you need to set it to fallback to the default language in case there's no translation available for categories as you can learn at: https://wpml.org/documentation/getting-started-guide/translating-post-categories-and-custom-taxonomies/#enabling-translation-of-a-custom-taxonomy. For those categories already translated you can delete them from your WordPress Dashboard > Posts > Categories you can just change to the language you need to delete the category term, using the top admin bar language switcher, then you should be able to edit/delete it. Let me know your results, please. |
July 19, 2023 at 6:43 am #14062673 | |
monih |
Hi Bobby, Do I miss something? Thanks |
July 20, 2023 at 3:18 am #14069043 | |
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
Hi Moni, from my side it looks like it actually has a translation even though the content is not translated the translated version of the category exists which is why it's not redirecting to the home page instead. I would like to request temporary access (wp-admin and FTP) to your site to test the issue. **Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken ** I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/ NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin. Thank you, |
July 24, 2023 at 8:53 pm #14092541 | |
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
Thank you for the access details! I can see what is causing this behavior. - Go to WPML->Settings->Taxonomies Translation -> Categories (category) It's currently set to "Translatable use translation if available or fallback to default language" which is why it looks like the translation exists when I reviewed the page even though it does not. Set it to "Translatable only show translated items" and it will resolve the issue you are experiencing. |
July 25, 2023 at 6:40 am #14093285 | |
monih |
Thanks for your help, all is working 100% now 🙂 |