• Hi,

    I’m designing a multi-language WordPress website in which each page loads a specific page content depending on the selected language. The homepage will show the contents from page_id=2 (which is in French, set as default), but if the user changes the language it will show the contents from page_id=8 (in English). I’m only doing this with index.php, using WP Query.

    My problem is: how do I replicate this CMS-like logic with the remaining pages? I mean, how do I make the “About” page show the contents from page_id=4 or the “Contact” page show the contents from page_id=12 (in English), for example? Also, is there any smarter way of doing this? Probably with custom page templates, each one for each page? And what’s the best way to maintaing a pretty permalink without having to use URLs like https://example.com/page-7?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I think you should use multi-page pages by placing <!--nextpage--> in your editor. For example, when you edit page_id=2, do this:

    … French …
    <!–nextpage–>
    … English …
    <!–nextpage–>
    … other language …

    You then use wp_link_pages to display links to localized pages.

    About the permalink, I’m not sure what you mean?

    Thread Starter joaoramos

    (@joaoramos)

    I’m not sure about that wp_link_pages. Are there any more ways of doing this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Simple page-based website’ is closed to new replies.