• Resolved kylekid123

    (@kylekid123)


    I just updated WP to 4.0 and all my header menus are gone. Anyone know if this a known issue? I have my website backed up, but i want to know if anyone knows how to fix this?

    This is my website https://www.acneskinsite.com/ The menus you see at the top are categories. My original menus structure was Home-About us– Acne Scars– Blackheads– Blog– Eye Care– Homemade Facials– Nutrition– Skincare.

    I did a google search all the pages are fine, but the menu is gone.

Viewing 7 replies - 16 through 22 (of 22 total)
  • Figured out my site’s problem. Regardless of setting my header menu as my main menu, it’s pulling from the un-set footer menu.

    Moving my header menu to the footer and that seems to be working

    It’s not a proper fix. Until this bug gets fixed from wordpress, goto your header.php file where your menu code is mentioned. edit the variable “menu” and give it a value of your menu name you want to use.

    Eg: “menu” => “TopMenu”

    TopMenu is the menu name i’m using.

    It sounds like your theme has the menu locations mixed up.

    I’ve seen this now on two sites after upgrading. I have 2 menus registered – a main header navigation and smaller footer navigation. In each case, regardless of what is specified in the menu location section, it is putting the footer in the header AND the footer.

    There’s a bug for sure.

    I’ve also encountered this issue – I think it’s a bug.

    Had a report from a site we host – same issue I am wondering if it is because it is an older theme.

    the theme is
    Zen Theme 1.0
    By Pixel Theme Studio
    It is an old “premium” theme that has not been updated in a long time..
    https://pixelthemestudio.ca/product/zen-theme/

    I posted an answer to this on a similar thread at https://www.ads-software.com/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 7 replies - 16 through 22 (of 22 total)
  • The topic ‘4.0 Broke my header menus’ is closed to new replies.