Setting Menus
-
I am confused a what to put in functions.php & header.php to get the menu working on the handheld device
Main Theme : Stockholm
Handheld Theme: Storefront
only one menu is used from Stockholm in Top Navigation location
menu name is eh_new_menu
-
Hello, have a look at our docs and let me know if they don’t fully assist you.
Device Theme Switcher Documentation: https://github.com/jamesmehorter/device-theme-switcher/wiki/3-FAQ#how-do-menus-and-widgets-work
Hi
Thanks for a quick reply
I did look at the docs before I requested help
I am just not getting what needs to be put where!
Your register_nav_menu() calls should be in each theme’s functions.php (as stated in the docs). And your wp_nav_menu() calls to display the menu should be wherever you wish to display the menus, e.g. header.php, footer.php, etc..
Does that answer your question?
Hi
I have out this in functions.php of both active and handheld theme
register_nav_menu(‘my-menu-location’, ‘eh-new-menu’);
active theme works, handheld theme displays a menu with everypage
last line should say, displays a full menu, not the selected one
there is only one menu – so nothing has been added to the header.php (as per your FAQ)
if need what should exactly should I add seeing I have added
register_nav_menu(‘my-menu-location’, ‘eh-new-menu’); in functions.php
If the mobile menu is displaying all pages that means your wp_nav_menu() call in the mobile theme is unable to find your menu (it’s defaulting to show all pages).
Make sure the wp_nav_menu() call in your mobile theme is identical to the cal in your active theme—you want to have the same code in both themes.
- The topic ‘Setting Menus’ is closed to new replies.