Created
October 13, 2015 11:19
-
-
Save delineas/43acfc91a4ac5084e4d2 to your computer and use it in GitHub Desktop.
Wordpress Select dropdown filter by month
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// /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> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment