Support » Plugin: Jetpack by » Mobile Theme is picking up wrong menu

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Richard Archambault


    Hi izbryte,

    I’m sorry I missed this thread when you originally posted it. Do you still have this issue? Would you like to try troubleshooting it?

    Yes I am. I had to change the code in the jetpack plugin to pick up the correct menu, which, obviously isn’t optimal. What do you need?

    Plugin Contributor Richard Archambault


    As it says in our docs:

    The Mobile Theme searches through the custom menu locations for your current desktop theme and displays the menu assigned to the primary position. If you have no custom menus assigned, it will default to the standard page menu.

    Is your theme a child theme? Can you show me a screenshot of your Appearance -> Menus page?

    I have several custom menus and I had assumed it would pick up the Main Menu but it picks up the Footer Menu. Here is the screenshot:
    This theme is a custom theme I created using the _s theme from

    Plugin Contributor Richard Archambault


    I’m not sure, but I think the issue is that your Footer menu shows up first in the list, and therefore likely has a lower menu ID than the PRimary menu, which would explain why Jetpack picks up that menu. Could you paste your theme’s functions.php to and in particular, the code where your menus are set up?

    Of course! Here you go!

    function register_my_menus() {
    		// This theme uses wp_nav_menu().
    	register_nav_menu( 'primary', 'Primary Menu');
    	register_nav_menu( 'top-menu', 'Top Menu');
    	register_nav_menu( 'footer-menu', 'Footer Menu');
    	register_nav_menu( 'mobile-menu', 'Mobile Menu');
    add_action( 'init', 'register_my_menus' );

    Can I just go into the database and change the id #’s assigned to the menus or will that create an issue?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Mobile Theme is picking up wrong menu’ is closed to new replies.