Waiting for author
Overview of the issue
When using the WP Residence theme with WPML, the language switcher located in the Mobile/Tablet burger menu may redirect to unrelated URLs instead of the translated version of the current page.
Workaround
Please, make sure of having a full site backup of your site before proceeding.
- Open the …wp-content/plugins/wpresidence-core/api/inc/menu_functions/menu_functions.php file.
- Look for line 156.
- Replace:
$mobile_menu = get_transient($transient_name); - With:
$use_cache = ! has_filter( 'wpml_active_languages' ); $mobile_menu = $use_cache ? get_transient( $transient_name ) : false; - Look for line 198.
- Replace:
set_transient($transient_name, $mobile_menu, 60 * 60 * 24); - With:
if ( $use_cache ) { set_transient($transient_name, $mobile_menu, 60 * 60 * 24); }