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”)?
-
Starting a new duplicate thread makes it very difficult and frustrating for people who are trying to help — if you have new, additional information, you can add it to the existing thread.
http://ww.wp.xz.cn/support/topic/gracia-theme-navigation?replies=21
Sorry about that! I just don’t know how to delete this thread now.
You can’t delete it – no worries, just continue on the other one. It just works better as a new person will know what you’ve already tried, etc., rather than starting from square one here.
The topic ‘Help with drop-down menus’ is closed to new replies.