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.
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.
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
HI there, I’ve added a child theme in and yes your code works, thanks so much!