{"id":3704917,"date":"2013-04-29T21:09:39","date_gmt":"2013-04-29T21:09:39","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/archive-dropdown-for-custom-post-type\/"},"modified":"2016-08-21T00:36:05","modified_gmt":"2016-08-21T00:36:05","slug":"archive-dropdown-for-custom-post-type","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/archive-dropdown-for-custom-post-type\/","title":{"rendered":"Archive dropdown for custom post type"},"content":{"rendered":"<p>I am tring to figure out how to have a dropdow that shows an archive of posts from a custom post type. I am using the code below but I cant figure out how to only show posts from the letters post type.<\/p>\n<p>Thank you for any help on this.<\/p>\n<pre><code>&lt;select name=&quot;archive-dropdown&quot; onchange=&quot;document.location.href=this.options[this.selectedIndex].value;&quot;&gt;\n  &lt;option value=&quot;&quot;&gt;&lt;?php echo esc_attr( __( &#039;Select Month&#039; ) ); ?&gt;&lt;\/option&gt;\n  &lt;?php wp_get_archives( array( &#039;type&#039; =&gt; &#039;monthly&#039;, &#039;format&#039; =&gt; &#039;option&#039;, &#039;show_post_count&#039; =&gt; 1 ) ); ?&gt;\n&lt;\/select&gt;<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-3704917","topic","type-topic","status-closed","hentry","topic-tag-post-type"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3704917","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\/3704917\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3704917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}