• Resolved jimwelch

    (@jimwelch)


    I’m using the plugin to offer two languages, English (default) and Spanish to my site at https://www.vrco.org.

    My (English) home page is successfully running on the front-page.php template. I’m trying to get my Spanish home page to run off of a custom page template (Spanish-Home.php), but it doesn’t seem to connect to the custom page template and stays in English. What is the best way to serve a translation of a (home) page that runs on a page template?

    Thanks!
    Jim

    https://www.ads-software.com/plugins/polylang/

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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.

    Thread Starter jimwelch

    (@jimwelch)

    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.

    Thread Starter jimwelch

    (@jimwelch)

    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!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Home page translation’ is closed to new replies.