This thread is resolved. Here is a description of the problem and solution.
Problem:
If you're experiencing issues with your website where changing the language results in too many redirects, it might be due to a conflict with custom code.
Solution:
We found that the issue was related to a custom snippet called "Gate for not logged in users". To resolve this, we recommend deactivating the snippet. Here are the steps to follow:
1. Locate the custom code snippet in your website's codebase.
2. Temporarily deactivate the snippet by commenting it out or removing it.
function custom_redirect_to_specific_page() { if (!is_user_logged_in() && !is_page(109)) { wp_redirect(home_url()); exit; } } add_action('template_redirect', 'custom_redirect_to_specific_page');
3. Check if the language redirection issue is resolved.
If you're not comfortable working with code or if the issue persists, we suggest reaching out to one of our certified partners for further assistance.
If this solution doesn't look relevant to your situation, please open a new support ticket with us.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 1 replies, has 2 voices.
Last updated by 1 year, 4 months ago.
Assisted by: Long Nguyen.