Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting
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 thread is resolved. Here is a description of the problem and solution.
Problem: Site does not redirect to correct language and loads old frontpage
Solution: 1. Create a template page into your theme and call it for example page-root-redirect.php.
- Here, add the following code:
<?php /* Template Name: Root redirect */ wp_redirect( home_url() ); exit; ?>
This will redirect to your main language folder.
2. Now go to WPML -> Languages :
- Select 'Different languages in directories'
- Enable 'Use directory for default language'
- Select 'A page Create root page.'
- And assign the 'Root redirect' template for it.
Now, when you go to your main site, you'll be redirected to your main folder.
Remember to remove your cookies or try an incognito view.
Relevant Documentation: https://wpml.org/documentation/getting-started-guide/language-setup/directory-default-language/