xili-language is able to manage page for posts since version 188.8.131.52 (feb. 2013) -
- 1 What is Page for posts ?
- 2 Settings of front page and page for posts
- 3 How to set navigation menu
What is Page for posts ?
Technically, page for posts (option named 'page_for_posts' in WP db) is a curious feature: if this page (post_type page) is called, the title is displayed in html title, menu item title but not the content of this page but the LIST of the latest posts without category selection... (the default query of WP loop). It is set in Appareance/Reading dashboard page when a static page is choose as front page (home webpage). In php source side, (query.php file) the way how the query is defined is not easy to find and to "modify" via filters by xili-language plugin. It is done now !
Settings of front page and page for posts
in Appareance/Reading dashboard page
First create the page to be defined as front-page of the website,
Second create a page inside where the latest posts will be listed
home webpage settings
In xili-language settings (2nd tab), the Reading settings are detected (1) . By default, in list of latest posts in page for posts, posts will be sub-selected (2) according language of page container.
page for posts for each language
As other pages in a multilingual website, define language of root page and linked translated pages in each language. In page for posts, only translate title in linked pages.
(as for front static page, xili-language uses an array of these pages and will display the right one according the rules - by example browser language set in second tab of plugin settings.)
The goal is here to define navigation menu content and item opening list of latest posts subselected according current language or language choose by visitor.
Screenshots are done in bilingual website. The title of page for posts is "Latest posts" and "Derniers articles" in french.
example with twentytwelve
The content of "primary" menu will completed by inserting menu item just before language menu items.
The french page containing latest posts list.
automatic insertion of a selection of pages according language
Go to 3th tab of xili-language settings
Scroll to fiedset named "Nav menu: Automatic sub-selection of pages according current language"
In Args add include=11,15 if 11 and 15 are the ID of page for posts and translation. Check "Add selection of pages in nav menu" and update.
example with theme twentytwelve-xili child of twentytwelve
This theme offers a way to create one menu location per language, so it is easy to add page item according language. twentyten-xili
So in Appareance Menus settings, 2 locations can contain different menus list.
And it is possible to have a french menu different than english menu with same item (here category news) and other..
The nav menus settings are with this child theme and nag menu instantiation a bit more different than in previous example.