wordpress all post filter by year
<select name=”archive-dropdown” onchange=”document.location.href=this.options[this.selectedIndex].value;”> <option value=””><?php echo esc_attr( __( ‘Select Year’ ) ); ?></option> <?php wp_get_archives( array( ‘type’ => ‘yearly’, ‘format’ => ‘option’, ‘show_post_count’ => 1 ) ); ?> </select> This code may help you.