• Resolved Krissieg

    (@krissieg)


    Hi there, hope you guys are well! There seems to be a conflict with your filter and the GTranslate plugin. When I select a YITH filter, the language dropdown menu changes, which is not meant to happen. It is correct when you refresh the page or reset filters. Please can you look into this as it only happens when using the YITH filters. Please watch how the GTranslate changes from English to select a language and appears in double after applying a YITH Filter. It only corrects when you refresh the page. Please take a look. Thanks! 🙂

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Pablo Pérez

    (@pperez001)

    Hi there,

    This problem rises as your theme or page builder doesn’t follow the page default structure that WooCommerce use. For that reason, our plugin is currently changing the whole page when it should only change the product list and filters, breaking the JS of your language selector. To fix this, please add the following code in the function.php of your theme:

    if( ! function_exists( 'yith_wcan_content_selector' ) ){

    function yith_wcan_content_selector( $selector ){

    $selector = '.main-content';

    return $selector;

    }

    add_filter( 'yith_wcan_content_selector', 'yith_wcan_content_selector',99 );

    }

    Let me know if your problem persist after adding this code.

    Thread Starter Krissieg

    (@krissieg)

    Hi Pablo,

    Thanks for the code. The theme I use is Salient, who uses your plugin by default so I’d have thought they would be correctly coded? Regarding your code, I’ve applied it using WPCode and it hasn’t fixed the issue. Please let me know what else we can try?

    Thanks for your help,

    Krissie

    Hi there,

    I checked the page you mentioned, but it seems to code isn’t being applied correctly.

    Could you try adding it directly to the functions.php file of the current theme? I also suggest you try cleaning the cache of your site.

    We’ll remain at your disposal.

    Thread Starter Krissieg

    (@krissieg)

    Sorry, please try now, I’ve reactivated the code using WPCode and cleared the cache. I’ve not got a child theme setup on this site you see.

    Thanks

    Thread Starter Krissieg

    (@krissieg)

    HI there, I’ve added a child theme in and yes your code works, thanks so much!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘YITH Filter affects GTranslate plugin’ is closed to new replies.