Reply To: Mobile theme switcher – issues with menu

Home Forums Any Mobile Theme Switcher Mobile theme switcher – issues with menu Reply To: Mobile theme switcher – issues with menu

#3941

grlfsk

Ok I just found the solution!:

I added the following code to my main themes functions.php:

function register_my_menu() {
  register_nav_menu('header-menu',__( 'Header Menu' ));
}
add_action( 'init', 'register_my_menu' );

This works because my mobile theme uses this header-menu and my main theme doesn’t. Now I can set the mobile menu in my main theme, because d/t this code it is added there to the menu positions settings and passed on to the mobile theme during switching. Hope it’s clear and it helps somebody else.

Just an idea for the plugin – would it be possible to automatically add all menu definitions from selected mobile themes to the default theme menu positions page? Or any other routine which registers the mobile menus with the default theme?