I have a widget section in the header that contains the language switcher widget. Most of the pages on the site do not have translations and are only in the main site language of English. Can you point me towards how to have the widget not appear at all on the page if that page only exists in the main site language, but if additional translations for that page are available to then show the widget?
Thank you for contacting WPML support. I'd be happy to assist you on this issue.
To debug this issue further, I would need to check your site settings once, for this I would need temporary access (wp-admin and ftp) to your site.
So could you please provide me with those details, you will find the needed fields for this below the comment area when you log in to leave your next reply. hidden link
Hello Shekhar, sorry for that inconvenience, the password was off. I've updated it and all of the previous private information I shared works for both admin access and sftp.
Hello Shakhar, that did not fix it. I use this plugin on multiple sites and I'm fairly certain in all of those cases there was a setting in the vast library of settings for this plugin that solved this issue rather than having to add custom code to functions.php.
For this site in question on this ticket, the switcher is added to a custom widget area. In my other sites it's coded into the header without using a widget location. Would this have anything to do with why this is happening?
When the switcher is used as a dropdown, it is currently not possible to disable the current language option. I believe you are referring to the similar setting available for horizontal switchers, where disabling the current language is supported.
I have forwarded your feedback to our 2nd tier supporters for further review.
Hello Christopher, looks like the block switcher is working perfectly. Thank you! Quick question, the code block that Shakhar pasted above, is that only to work with the block switcher (referred to as 'language-switcher' in the function?)