Support » Themes and Templates » Help with drop-down menus

  • Hey, could someone help me create a horizontal navigation drop-down menu for the Gracia theme? The following is in my header.php code:

    <div class="navcontainer">
    		<?php
                        if(function_exists('wp_nav_menu')) {
                            wp_nav_menu( 'depth=1&theme_location=menu_2&menu_id=nav&container=&fallback_cb=menu_2_default');
                        } else {
                            menu_2_default();
                        }
    
                        function menu_2_default()
                        {
                            ?>
                            <ul id="nav">
        						<li <?php if(is_home()) { echo ' class="current-cat" '; } ?>><a href="<?php bloginfo('url'); ?>">Home</a></li><!--
        						<?php wp_list_pages('depth=2&hide_empty=0&orderby=name&order=ASC&title_li=' ); ?>-->
        					</ul>
                            <?php
                        }
                    ?>		
    
    				</div>

    The second part is commented out because it reveals ALL of the pages on the website. However, I don’t want it to do that. There are parent and children (and even grandchildren) pages and I want to create drop-down menus that reflects that hierarchy. Please help!

    I’ve created a custom menu that shows the hierarchy, so is there a way to call that custom menu (which is called “Navigation”)?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Help with drop-down menus’ is closed to new replies.