This thread is resolved. Here is a description of the problem and solution.
My homepage appearing blank but language directories work fine. I have the following error:
PHP Warning: include(): Failed opening 'xxx' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in xxx/sitepress-multilingual-cms/inc/request-handling/redirection/wpml-rootpage-redirect-by-subdir.class.php on line 47
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.
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.