Archive dropdown for custom post type
-
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.
Thank you for any help on this.
<select name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;"> <option value=""><?php echo esc_attr( __( 'Select Month' ) ); ?></option> <?php wp_get_archives( array( 'type' => 'monthly', 'format' => 'option', 'show_post_count' => 1 ) ); ?> </select>
The topic ‘Archive dropdown for custom post type’ is closed to new replies.