Dynamic Primary Menu
-
I want to make my website multilingual by adding custom menus for each language. I want my primary menu to change based on the language selected in the top menu. I am using the Stay theme at https://imazhe.org/ I am willing to change my theme if that is what it takes. I want my site to be similar to https://arboretumpouyouleix.com/ which is referenced in the forum on creating a multilingual site. All of the tutorials I have seen require coding which isn’t possible with wordpress.com sites. I would rather not have the navigation in a sidebar or footer. Thank you!
The blog I need help with is: (visible only to logged in users)
-
-
Hi, I need exactly the same thing! That is the functionality of https://arboretumpouyouleix.com/ site.
I’m trying to figure it out what makes the primary menu change when you switch between langauges.
Plase let me know when you find a solution.
-
Hi,
Here is what you can do (taking the https://arboretumpouyouleix.com/ example).
English and French are categories.
Each menu (Englis and French) is a Custom Menu (check widgets).
In the English menu visibility (check the Visibility button at the bottom of the Custom Menu widget) is set to: Show if Category is English.
In the French menu visibility is set to: Show if Category is French.
Hope it helps.
-
Hi! Thanks for the advice. It looks like categories only work for posts, though, not pages. Posts don’t have the short URLs that pages have. Do you know if there is any way to add a category to a page?
Thanks for the help.
-
No, unfortunately pages don’t have categories (nor tags).
Nevertheless, if you need pages you can create two Custom Menus and set the Visibility for Englis Menu like that:
Show if Page is Visiting
or
Show if Page is About Us
or
Show if Page is Collections
… and so one for every page in EnglishAnd for the French Menu:
Show if Page is Visiter
or
Show if Page is Qui sommes-nous?
or
Show if Page is Collections
… and so one for every page in FrenchI guess in real life this is only feasible if you have a reasonable number of pages (which https://arboretumpouyouleix.com has). If you have too many pages I guess it could be annoying to update each of the two Custom Menus every time you create a new page. Or maybe not …
- The topic ‘Dynamic Primary Menu’ is closed to new replies.