Mobile Menu JetPack not switching languages
-
Hi,
I’ve activated the Mobile Theme module of JetPack (Minileven) which is a optimized version of Twenty Eleven Theme for mobiles.
While in my desktop theme (customized Kirumo) I can perfectly see the menus as I organized in the Admin Menu page and changing the language (location) depending on the user language, in the mobile theme it doesn’t work.In the original header.php of that theme the menu is called like this:
wp_nav_menu( array( 'theme_location' => 'primary', 'container_class' => '', 'menu_class' => 'nav-menu', 'menu' => $menu_id ) );
In this way the menu is always showing in English because the $menu_id variable is containing the English location.I’ve tried also removing the ‘menu’ argument from the call and indeed I get the menu in the correct language but not the correct menu: some elements are missing, others are there when not included and the sorting is alphabetical. As I can understand the default menu of the theme is showing (only Page-type posts and their children, that’s wp_page_menu()) instead of showing my customized menu (with categories).
In its funtions.php Minileven register the location ‘primary’ and Kirumo ‘mobile’, ‘header’, and ‘social’. Never mind which one I use as theme_location, the result is the same. Even if I remove the registration of ‘primary’ in Minieleven still the menu is the same. The only argument affecting is ‘menu’.
How can I hack this properly?
I’ve read some other threads but I don’t find the way to adapt it to my case.Thanks a lot.
Regards.
P.D.: I have a cache plugin but I’ve deactivated it while doing the tests.
-
Hi
I didn’t reproduce your issue (Jetpack + Kirumo + Polylang), the menus switch correctly on mobile theme.Did you setup the last Polylang version: 1.7.11?
Hi Chrystl,
Thanks for your reply.
I’ve already said but maybe it’s not clear in my post: Kirumo + Polylang is working well, but the mobile theme of JetPack overwrites the mobile theme of Kirumo and uses Minileven. So summarizing the issue is (Minileven + Polylang).Have a look with a smartphone to my blog and you’ll see what I say: http://navarradas.com
Regards,
Oh, wait, maybe I misread your reply.
Do you mean you’ve activated the Jetpack module of Mobile Theme and see correctly the menus switching? Or just activated Jetpack but without Mobile Theme? (I understood the last)
Regards,
I tested with:
* Jetpack 3.7.2 with Settings > Mobile Theme :activated. Is it well Minileven?
* Kirumo 0.3,
* Polylang 1.7.11,
* WordPress 4.3.1.Have I missed something?
EDIT: Did you assign your mobile menus in Appearance > Menus > Manage Locations tab?
Do you mean you’ve activated the Jetpack module of Mobile Theme and see correctly the menus switching?
Yes.
Did you assign your mobile menus in Appearance > Menus > Manage Locations tab?
Yes, the locations are assigned and the version of Polylang is indeed the last one.
All the settings you used are the ones I have. So it’s not the theme, it’s not polylang… something has to be different…
I’ll give to it another look and come back to you.
Thanks for the testing!
Hi again Chrystl,
I’m still fighting with the theme that now is doing weird things…
Please, could you check this for me in your scenario?
– If you click any of the links of the menu, do you still keep the same theme? (I mean, it appears like the same theme style). If you change the language, still the same theme in any link?
– Do you use categories as menu items? When using them and click in any, do you still keep the theme and the language?I’ll continue reviewing the code but I’ve tried disabling almost anything and still the same issues…
Thanks!
– Do you use categories as menu items? When using them and click in any, do you still keep the theme and the language?
I tested and yes I still keep the same theme style and the language whatever the item.
Did you create a child theme to customize your theme?
Hi again,
I didn’t have the child theme (yeah, fail), but I’ve created it now with all my modifications and make a clean install of Kirumo.
The problem persists with the original Kirumo + JetPack. It also persists if I deactivate all the plugins except Polylang and JetPack.But there is something even more weird: deactivating only JetPack (therefore, not Minileven theme) I get Kirumo Mobile theme for English language but if I switch to Spanish language then I see the Minileven theme!!!
What’s going on here? I’ve seen in the forum some people reporting possible bugs about cache. Could be this issue related to them? I don’t have any cache system (and I deactivated all plugins) and I’ve tried with different mobile browsers and deleting their cache and the results are all the time like that.
I use this option for the URLs:The language is set from the directory name in pretty permalinks
However this is not happening to you with apparently the same scenario.
Sorry, I meant deactivating “also JetPack” instead of “only JetPack”.
The problem persists with the original Kirumo + JetPack.
Does the theme’s style is changing with only Kirumo 0.3 and Jetpack 3.7.2?
About the cache, before testing you can clear your cookies and the cache of your browser.
Does the theme’s style is changing with only Kirumo 0.3 and Jetpack 3.7.2?
Yes. And what is more weird, with only Kirumo 0.3 and not Jetpack.
About the cache, before testing you can clear your cookies and the cache of your browser.
All of that is done. I do it every time I change something to be sure nothing is cached.
I played one hour ago on your site and I didn’t see the theme style changed.
Could you give some steps to reproduce this issue on your site, and provide some screenshots when the style theme has changed?You can upload them via http://snag.gy and link to them here.
On the mobile?
Forget about my previous message. Today is not happening. I think maybe after many tests I maybe didn’t clear some cache or whatever. Today it’s ok.
Right now the only problem is the initial issue with the menu.
Screenshot with Polylang+Minileven in English:
http://snag.gy/GvIlw.jpg
http://snag.gy/ViSI6.jpg
Screenshot with Polylang+Minileven in Spanish:
http://snag.gy/HIk4w.jpg
http://snag.gy/I2m5o.jpg
As you can see, the menu is the same, all in English.If I deactivate the Mobile Theme of Jetpack (Minileven) then Kirumo takes the control of the Mobile Theme and everything is fine.
Did you make your menu tests with a child theme or Kirumo without any custom code?
- The topic ‘Mobile Menu JetPack not switching languages’ is closed to new replies.