WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp_nav_menu 'container' not working (2 posts)

  1. stefandunn
    Member
    Posted 2 months ago #

    I have the following code to try and achieve a menu wrapped in a nav tag but it doesn't seem to work. My code is:

    wp_nav_menu(array(
       'container' => 'nav',
       'container_id' => 'navigation'
    ));

    The output is:

    <div class="menu">
         <ul>
              <li class="page_item page-item-2 current_page_item"><a href="http://localhost/Portfolio/">Homepage</a></li>
        </ul>
    </div>
  2. stefandunn
    Member
    Posted 2 months ago #

    I didn't add theme support for menus, that was causing the issue. Obviously it was then acknowledging the fallback function.

Reply

You must log in to post.

About this Topic