WordPress.org

Forums

Jetpack by WordPress.com
Mobile Theme is picking up wrong menu (7 posts)

  1. izbryte
    Member
    Posted 1 year ago #

    I'm using the Mobile theme on my WordPress site which is using a simple custom theme but it is not picking up the primary menu but the footer menu. The site is http://www.allstorecenter.com/. I've tried switching to WordPress standard theme (2012) and set the primary menu there but the same thing happens. Can anyone please help?

    https://wordpress.org/plugins/jetpack/

  2. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    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?

  3. izbryte
    Member
    Posted 1 year ago #

    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?

  4. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    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?

  5. izbryte
    Member
    Posted 1 year ago #

    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: http://eyesbryte.com/ps.jpg.
    This theme is a custom theme I created using the _s theme from http://underscores.me/.

  6. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    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 http://pastebin.com and in particular, the code where your menus are set up?

  7. izbryte
    Member
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Jetpack by WordPress.com
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic