Support » Fixing WordPress » WP 4.0 Broke Main Menu

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator t-p

    (@t-p)

    Try a few basic troubleshooting steps:
    – Clear your browser’s cookies and all cache.
    – Try deactivating ALL plugins temporarily to see if this resolves the problem. If this works, re-activate them individually (one-by-one) to find the problematic plugin(s).
    – If that does not resolve the issue, try switching to the unedited default Twenty Fourteen Theme for a moment using the WP dashboard to rule out any theme-specific issue.

    Have you tried going to Appearance > Menus and re-setting the two menus to the right locations?

    This happened to one site of mine too, upon upgrading to 4.0, and that’s all I had to do.

    Thread Starter globalhelpswap

    (@globalhelpswap)

    Hi all, thanks but none has worked. 🙁

    Does anybody have anymore suggestions?

    Thanks,

    Paul

    So, on the Appearance > Menus screen, on the Edit Menus Tab, do you have one or more custom menus set up?

    On the Manage Locations Tab, what Locations does your theme support?

    Which menus are assigned to which locations? Are you sure these are set correctly?

    When you pursued the troubleshooting method Tara recommended, and you got to the point where you have ZERO plugins activated and the default TwentyFourteen theme activated, does the main top menu show your footer menu?

    I posted an answer to this on a similar thread at http://wordpress.org/support/topic/wp-40-broke-main-menu?replies=25

    To recap the details here:

    Issue:
    The original code most likely had been written incorrectly. When wp_nav_menu calls failed in the past, it defaulted to the first menu that was created. Now in 4.0, there is a sort on the menus by name on line 280 of wp-includes/nav-menu-template.php triggered when $menu returns false from bad, or no parameters. This means it will now default to the first menu alphabetically.

    The problem:
    If you’re not properly passing menu parameters through an array in your templates, or you’re passing a broken array or string it will now default to a different menu, assuming you have more than one menu in your WP site, and the title names were not added in alphabetical order.

    The fix:
    Verify the argument arrays you send to wp_nav_menu do not contain any trailing characters, extra commas, incorrect parameters, etc.

    Hope this helps.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP 4.0 Broke Main Menu’ is closed to new replies.