• Resolved tatiwp2019

    (@tatiwp2019)


    I am building a bilingual site with Wpml. I installed your plugin for the management of the sub categories of post and with one language it works well. However, when I switch to the second language (English), the translations of the categories are correctly displayed, but clicking on it takes me back to the category page in the first language (Italian).
    This only happens if I choose the view with the dropdown menu. If all the categories are displayed, the links are correct. However, since there are many categories, I have to use the dropdown menu.

    Can you help me?
    Than you very much

    Tatiana

Viewing 4 replies - 1 through 4 (of 4 total)
  • Anonymous User 393930

    (@anonymized-393930)

    This is an issue for WPML and you should raise it with them – I don’t have WPML so I can’t help with this problem, sorry.

    Thread Starter tatiwp2019

    (@tatiwp2019)

    Hi,
    I contacted the Wpml support and this is their answer:

    “This appears to be a compatibility issue. Inside the file wp-content/plugins/sub-categories-widget/sub-categories-widget.php at line 94, replacing this line:

    if (dropdown'.$this->number.'.options[dropdown'.$this->number.'.selectedIndex].value > 0) { location.href = “'.get_option('home').'?cat=”+dropdown'.

    to

    if (dropdown'.$this->number.'.options[dropdown'.$this->number.'.selectedIndex].value > 0) { location.href = “'.get_home_url().'?cat=”+dropdown'.

    Since this looks like just a function problem (get_option(‘home’) to get_home_url()) you would need the author of the modified plugin on his side.

    You can suggest the above change or request that he contact our compatibility team using the link: https://wpml.org/documentation/theme-compatibility/go-global-program/

    Can you modify the plugin as they say?ù

    I await your kind reply
    Thanks for collaboration

    Tatiana

    Anonymous User 393930

    (@anonymized-393930)

    You should make this change yourself on your own install (you can easily edit the file in the WordPress Admin interface) and test that it actually resolves your issue. I have no way to test this myself and do not wish to make a change without knowing that it fixes your issue.

    Please let me know if it does and I will then see if I can make this change without impacting other users. If I can then I will try to implement it in the next release.

    Thread Starter tatiwp2019

    (@tatiwp2019)

    I made the change as indicated and now everything works

    here is line 94 modified in pho
    if (dropdown’.$this->number.’.options[dropdown’.$this->number.’.selectedIndex].value > 0) { location.href = “‘.get_home_url().’?cat=”+dropdown’.$this->number.’.options[dropdown’.$this->number.’.selectedIndex].value; }

    Bye
    Tatiana

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PROBLEM WITH DROPDOWN MENU IN A BILINGUAL SITE’ is closed to new replies.