Plugin Author
Chouby
(@chouby)
According to the codex, the front-page.php template takes precedence on Spanish-Home.php. So I suggest that you use English-Home.php instead of front-page.php fro English and suppress the front-page.php template.
Thanks for responding, Chouby. Unfortunately, this didn’t fix my problem.
Here’s how I’m unsuccessfully attempting to provide an English and Spanish version of my home page (www.vrco.org), by using two different custom page templates:
I have a WordPress page titled “Home” which relies on a page template I created called “english-home.php,” which renders correctly as the default translation.
I also want to offer a Spanish version of the home page, I have a WordPress page titled “Inicio” which relies on a page template I created called “spanish-home.php.”
When I click to select the Spanish version of the home page, the Spanish page menu and widgets successful show the Spanish translations but the main content, which relies on the “spanish-home.php” page template, does not render and instead stays in English.
Any ideas?
Plugin Author
Chouby
(@chouby)
Now it’s really strange. When I look at your html source, the correct page template is correctly loaded for both languages. You can look yourself in body class.
Thanks for responding again, Chouby.
I think I figured out the problem. Even though I had switched the page template powering the home page(s), from front-page.php to english-home.php in my post editor view, I failed to completely remove front-page.php from my theme directory. Therefore, front-page.php was still powering the home page.
Thank you for your help and for a great plugin!