Error When Implementing the Menu Management System (2 posts)

  1. RenFromPenn
    Posted 6 years ago #

    I am trying to add the new menu management system to my theme, but it isn't working out. Here is what I did.

    1. Added add_theme_support('nav-menus'); to my functions.php file

    2. Added <php wp_nav_menu($args); ?> to header.php where I want the list to appear.

    I then went to Appearance | Menus and created a new menu. So far, so good. The menu shows up and I can customize it without issue. The problem comes in when I delete the menu. Immediately after deletion, the page refreshes and this message appear at the top of the admin area.

    Warning: Invalid argument supplied for foreach() in
    /home/username/public_html/wp-admin/nav-menus.php on line

    I have tried adding this functionality to two different themes and the result is always the same. When I activate Twenty Ten and create/delete a menu this message does not appear.

  2. rwwood
    Posted 6 years ago #

    It doesn't look like you've defined any arguments for wp_nav_menu(). Check out the examples on the wp_nav_menu() page.

Topic Closed

This topic has been closed to new replies.

About this Topic