WordPress.org

Ready to get started?Download WordPress

Forums

WP Menus (1 post)

  1. arturocivit
    Member
    Posted 1 year ago #

    Hi, I'm trying to understand the whole menu thing, but still not sure where ti place things, hope somebody can send me in the right path, so here I go:

    In my functions.php I got this:

    add_theme_support('nav-menus'); if ( function_exists('register_nav_menus')) {
    register_nav_menus( array(
    'main' => 'Main Nav'
    ) );
    }

    Then, I have the menu structure like this:

    <div class="navbar">
    <div class="navbar-inner">
    <div class="container">
    <ul class="nav">
    <li class="active"><a href="#">Main Item</a></li>
    <li><a href="#">Item</a></li>
    <li><a href="#">Item</a></li>
    <li><a href="#">Item</a></li>
    </ul>
    </div>
    </div>
    </div>

    Then I have this, I assume, to call the dynamic menu:

    <?php wp_nav_menu( array('menu' => 'Main', 'container' => 'nav' )); ?>

    So, at this point all what I have, those separated elements are ok, the question is, where is this going to be placed: <?php wp_nav_menu( array('menu' => 'Main', 'container' => 'nav' )); ?> or what should I do in order to make the dynamic menu works with my styles?

    Thanks in advance!

    Arturo

Topic Closed

This topic has been closed to new replies.

About this Topic