{"id":1710644,"date":"2010-10-07T20:43:15","date_gmt":"2010-10-07T20:43:15","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/drop-downs\/"},"modified":"2016-08-19T19:56:28","modified_gmt":"2016-08-19T19:56:28","slug":"drop-downs","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/drop-downs\/","title":{"rendered":"Drop downs"},"content":{"rendered":"<p>I&#8217;m a beginner to intermediate WP programmer.  I&#8217;m trying to figure out how to do a simple drop down menu with nav that uses pages.  I did drop downs on <a href=\"http:\/\/www.oops50.com\/\">this blog<\/a> that uses categories for the nav with just this code (no plugin):<\/p>\n<pre><code>&lt;ul id=&quot;nav_menu&quot;&gt;\n   &lt;li&gt;&lt;a href=&quot;&lt;?php echo get_settings(&#039;home&#039;); ?&gt;&quot;&gt;Home&lt;\/a&gt;&lt;\/li&gt;\n   &lt;?php wp_list_pages(&#039;include=2&amp;title_li=&amp;depth=1&#039;);?&gt;\n   &lt;?php wp_list_categories(&#039;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&amp;title_li=&amp;depth=2&#039;);?&gt;\n   &lt;?php wp_list_pages(&#039;include=2308&amp;title_li=&amp;depth=1&#039;);?&gt;\n&lt;\/ul&gt;<\/code><\/pre>\n<p>I&#8217;m trying to do the same for <a href=\"http:\/\/www.subtleyoga.com\/\">this blog<\/a> that uses mostly pages for the nav and thought it would be similar, however, can&#8217;t get it to work.  Here&#8217;s what I tried testing one item &#8211; the second one down (#2 is parent):<\/p>\n<pre><code>&lt;ul id=&quot;nav_menu&quot;&gt;    \n\n&lt;?php wp_list_pages(&#039;include=3&amp;title_li=&amp;depth=1&#039;);?&gt;\n&lt;?php wp_list_pages(&#039;include=2,896,898,903&amp;title_li=&amp;depth=2&#039;);?&gt;\n&lt;?php wp_list_pages(&#039;include=23&amp;title_li=&amp;depth=1&#039;);?&gt;\n&lt;?php wp_list_pages(&#039;include=25&amp;title_li=&amp;depth=1&#039;);?&gt;\n&lt;?php wp_list_pages(&#039;include=27&amp;title_li=&amp;depth=1&#039;);?&gt;\n&lt;?php wp_list_categories(&#039;include=3&amp;title_li=&amp;depth=2&#039;);?&gt;\n&lt;?php wp_list_pages(&#039;include=407&amp;title_li=&amp;depth=1&#039;);?&gt;\n            &lt;\/ul&gt;<\/code><\/pre>\n<p>I set up the pages so that the main nav (ID2) is a parent page and the drop downs are children but still won&#8217;t work.<\/p>\n<p>Thanks for your help!<\/p>\n","protected":false},"template":"","class_list":["post-1710644","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1710644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1710644\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=1710644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}