Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Wordpress Select dropdown filter by month
// /wp-content/themes/Karma/template-full-width.php
// Below line #41 <main role="main" id="content" class="content_full_width">
<div class="select-archive-dropdown" style=“text-align: right;margin-bottom: 15px;”><select name="archive-dropdown" onChange='document.location.href=this.options[this.selectedIndex].value;'>
<option value=""><?php echo attribute_escape(__('Select Month')); ?></option>
<?php wp_get_archives('type=monthly&format=option&show_post_count=1'); ?> </select>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment