Lay Theme and Polylang_Front Page
-
Dear @nypaloto, dear @Richard-Keith,
as the english site worked perfectly with the solution above, I wanted to start with the french and spanish versions of the site.
So I added another language in Polylang, added the page ID in the Polylang’s string section »frontpage_select_page« ...
... but on the front-page, when I click on »FR«, this link is still linked to the »EN« version of the site –> www.matteroffact.de
Does anyone has an idea, why this is not working? Thanks again for your help!
Greetings from Cologne
Alex -
Dear Alex @rocked23
Without knowing exactly whats going on with your polylang, it is difficult to help fully :)
You could always force the link with jQuery added to "custom <head> content" within 'Lay Options - Custom CSS & HTML'
https://stackoverflow.com/questions/179713/how-to-change-the-href-for-a-hyperlink-using-jquery
Best wishes & Good Luck!
Richard
-
@mariusjopen Would be handy to have this solution included in the Lay Documentation. I can confirm that it works.
@nypaloto said in Lay Theme and Polylang_Front Page:
Got this solved, thanks to Polylang's support:
- Create a 'polylang' folder in wp-content (or use existing 'polylang' folder)
- Upload the wpml-config.xml file (see below link) into the 'polylang' folder
- In your Wordpress admin, go to to Languages > String translations and search for 'frontpage_select_page'
- Replace the existing number in the ID field of the foreign language with the ID number '112' (see screenshot received from Polylang in below link )
- Save the changes
And this should do it! It worked for me, with a site in English and Japanese. Note that we're using Project Thumbnails for our home page (not Thumbnail Grid or Element Grid), and had to manually add the Japanese thumbnails to the Japanese home page.
XML file and Polylang's screenshot are here: https://drive.google.com/drive/folders/14kQ_7C6hEwktKLXzmAYcBwAzm8lSl_gi
Hope this helps!
-
Perhaps including other Lay options too, e.g. footer:
<wpml-config>
<admin-texts>
<key name="theme_mods_lay">
<key name="frontpage_select_page" />
</key>
<key name="lay_projects_footer" />
<key name="lay_pages_footer" />
<key name="lay_categories_footer" />
</admin-texts>
</wpml-config> -
Thanks @nypaloto! I found the problem (did not renew permalinks and had to set a an actual page) and this solution worked for me as well.
-
Hi! I'm having a problem with this as I cannot find the frontpage_select_page string in the Strings translations page. I uploaded the wpml-config.xml in my public_html/wp-content/plugins/polylang and it didn't do anything. I also tried to create a folder named polylang in public_html/wp-content/polylang and still nothing. Any idea how to make this work?
Thanks a lot in advance!
-
Hey I had the same issue. Nothing really worked … but if that is a help for you. I worked around it. Instead of using the Language Switch directly I added individual link to the front-pages directly … that works at least. A little bit annoying because if you switch languages it jumps to the front page … but at least it works …
-
This solution did not work for me. The page displayed is empty after doing that.
The language switcher also doesn't work on other pages. It only links to the home page but never brings you to the translated version of the page you're on right now.
I don't know what to do. I tried qTranslate, WPML and now Polylang and I never managed to achieve a properly working multilanguage Laytheme. It's so frustrating.
@nypaloto said in Lay Theme and Polylang_Front Page:
Got this solved, thanks to Polylang's support:
- Create a 'polylang' folder in wp-content (or use existing 'polylang' folder)
- Upload the wpml-config.xml file (see below link) into the 'polylang' folder
- In your Wordpress admin, go to to Languages > String translations and search for 'frontpage_select_page'
- Replace the existing number in the ID field of the foreign language with the ID number '112' (see screenshot received from Polylang in below link )
- Save the changes
And this should do it! It worked for me, with a site in English and Japanese. Note that we're using Project Thumbnails for our home page (not Thumbnail Grid or Element Grid), and had to manually add the Japanese thumbnails to the Japanese home page.
XML file and Polylang's screenshot are here: https://tinyurl.com/y42xtz8b
Hope this helps!
-
@tspallek I did such a workaround for years but I think it's really bad for SEO. And it sucks. Because in fact, you don't really have a language switcher, it's like just going to another version of the page.
-
Even if this topic is kind of old.
I had to deal with this problem twice now. And I figured out how it works twice.You procede as nypaloto described it:
- Create a 'polylang' folder in wp-content (or use existing 'polylang' folder)
- Upload the wpml-config.xml file (see below link) into the 'polylang' folder
- In your Wordpress admin, go to to Languages > String translations and search for 'frontpage_select_page'
- Replace the existing number in the ID field of the foreign language with the right ID number
- Save the changes
Step 4. is crucial. You have to look up which page or post_id your site got. I did that by exporting all my pages as an XML. But there are several ways to look that up. For each language you have to find out the id and put it in at 'frontpage_select_page'
I'm sure next time I try to figure out how it worked I'll stumble uppon this thread again.
Best
Leo -
Dear Lay-Theme Community and @Leopold-Lenz,
I am now facing the same problem. Have you already found another, simpler solution without having to change folders or codes, just through the WordPress interface for example?
I would be super grateful for any help!
Thank you very much and best regards -
so
the problem is your frontpage cant have a different language?
can you send the link so i can try to understand it better
can you describe it more pleasei also want to take a look at it in the admin side after you describe the issue more+
can you send your website address, /wp-admin/ username and password and a link to this topic to info@laytheme.com?
i think i had fixed an issue like that before
-
ur email address doesn't work :)
-
so the issue was he said, why does my frontpage show up in the same language when im here:
mywebsite.com/en/
and
mywebsite.com/de/so my answer was:
when u are here
https://wordpress-492321-4011564.cloudwaysapps.com/de/and click on EN
you arrive at:
https://wordpress-492321-4011564.cloudwaysapps.com/en/home/
instead of only /en/ (simply the page with only /en/ doesn't exist)
and when you edit this page in wp-admin:
https://wordpress-492321-4011564.cloudwaysapps.com/wp-admin/post.php?post=623&action=edityou'll see the permalink is: /en/home/
so everything works as it should so far. you just had a different expectation of how it should work.
you cannot change it to /en/ here unfortunately.so how do we make it work the way you want to? its a matter of configuration.
look: https://polylang.pro/doc/url-modifications/we need to go to settings → reading and set your homepage here as a static site:
make sure that same page is also set as frontpage in customize → frontpage
now we can go to languages → settings
then click "url modifcations" - settings:settings need to be like this:
especially:
then i realized this setting is not compatible with lay theme, i fixed that too on your website. this will be included with the next update
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it