Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Chrystl

    (@chrystl)

    Hi

    You can keep only the front-page.php and test the pll_current_language() to code the difference between the 2 languages.

    Thread Starter Tubia

    (@tubia)

    Hi Chrystl,
    thank you for the reply.
    I’ll read the docs but with this method it will be possible to have example.com/de/ URL or example.com/fr and so on?
    Switch content basing on the current language doesn’t seem to maintain this distinction.

    Plugin Support Chrystl

    (@chrystl)

    Don’t create example.com/de/ URL or example.com/fr if you use pll_current_language() function.

    Thread Starter Tubia

    (@tubia)

    Hi Chrystl,
    well actually this is my expected behaviour: to have a default language in the home, let’s say EN, that corresponds to example.com and then have different languages, for example french, that are example.com/fr and so on.
    What I’m trying to understand is if with using that simple function inside my static templates I can display different content (also HTML code) based on language.

    Thank You

    Plugin Support Chrystl

    (@chrystl)

    Sorry I was not clear.
    This function allows you to have a template for several languages.

    Regarding your home pages if you want get that example.com/de/ URL or example.com/fr you must check the option : “The front page url contains the language code instead of the page name or page id”.

    Thread Starter Tubia

    (@tubia)

    Hi Chrystl,
    thank you for the reply. I’m trying to understand but it’s not so clear to me. Could you provide a simple example?
    Thank you in advance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom template for different languages’ is closed to new replies.