Title: Drop downs
Last modified: August 19, 2016

---

# Drop downs

 *  [Sculley](https://wordpress.org/support/users/sculley/)
 * (@sculley)
 * [16 years ago](https://wordpress.org/support/topic/drop-downs/)
 * I’m a beginner to intermediate WP programmer. I’m trying to figure out how to
   do a simple drop down menu with nav that uses pages. I did drop downs on [this blog](http://www.oops50.com/)
   that uses categories for the nav with just this code (no plugin):
 *     ```
       <ul id="nav_menu">
          <li><a href="<?php echo get_settings('home'); ?>">Home</a></li>
          <?php wp_list_pages('include=2&title_li=&depth=1');?>
          <?php wp_list_categories('include=472,471,470,469,468,467,466,465,464,463,462,333,310,300,299,293,292,291,290,289,288,287,286,285,284,283,282,280,279,278,277,276,275,274,273,272,271,270,269,254,248,249,180,279,251,252,253,266,267,268,167&title_li=&depth=2');?>
          <?php wp_list_pages('include=2308&title_li=&depth=1');?>
       </ul>
       ```
   
 * I’m trying to do the same for [this blog](http://www.subtleyoga.com/) that uses
   mostly pages for the nav and thought it would be similar, however, can’t get 
   it to work. Here’s what I tried testing one item – the second one down (#2 is
   parent):
 *     ```
       <ul id="nav_menu">    
   
       <?php wp_list_pages('include=3&title_li=&depth=1');?>
       <?php wp_list_pages('include=2,896,898,903&title_li=&depth=2');?>
       <?php wp_list_pages('include=23&title_li=&depth=1');?>
       <?php wp_list_pages('include=25&title_li=&depth=1');?>
       <?php wp_list_pages('include=27&title_li=&depth=1');?>
       <?php wp_list_categories('include=3&title_li=&depth=2');?>
       <?php wp_list_pages('include=407&title_li=&depth=1');?>
                   </ul>
       ```
   
 * I set up the pages so that the main nav (ID2) is a parent page and the drop downs
   are children but still won’t work.
 * Thanks for your help!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [16 years ago](https://wordpress.org/support/topic/drop-downs/#post-1710824)
 * the dropdown is facilitated by the corresponding css styles, which are not present
   in the non-working example.
 * try to copy all the `#nav_menu` css styles from the working blog’s style.css (
   quite towards the end, starting with `/**************************** Navi *********************************/
   `)
   into the non-working blog’s style.css.
 * you may need to make minor adjustments to match the design.
 *  Thread Starter [Sculley](https://wordpress.org/support/users/sculley/)
 * (@sculley)
 * [16 years ago](https://wordpress.org/support/topic/drop-downs/#post-1710907)
 * Thanks alchmyth. I tried that and the drop downs still didn’t display. Is my 
   code correct above?
 *  Thread Starter [Sculley](https://wordpress.org/support/users/sculley/)
 * (@sculley)
 * [16 years ago](https://wordpress.org/support/topic/drop-downs/#post-1711082)
 * Just got it. I copied the CSS from my other site and then changed the php. Here’s
   the code in case someone else is trying to figure it out:
 * <div id=”navbar_menu”>
    <ul id=”nav_menu”>
    - <?php wp_list_pages(‘include=3&title_li=&depth=2’);?>
    - <?php wp_list_pages(‘include=2,896,898,903&title_li=&depth=2’);?>
    - <?php wp_list_pages(‘include=23&title_li=&depth=2’);?>
    - <?php wp_list_pages(‘include=25&title_li=&depth=2’);?>
    - <?php wp_list_pages(‘include=27&title_li=&depth=2’);?>
    - <?php wp_list_categories(‘include=3&title_li=&depth=2’);?>
    - <?php wp_list_pages(‘include=407&title_li=&depth=2’);?>
    - </div>

Viewing 3 replies - 1 through 3 (of 3 total)

 The topic ‘Drop downs’ is closed to new replies.

 * 3 replies
 * 2 participants
 * Last reply from: [Sculley](https://wordpress.org/support/users/sculley/)
 * Last activity: [16 years ago](https://wordpress.org/support/topic/drop-downs/#post-1711082)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
