fix(sidebar): use a dropdown for archive

Fixes #12
Fixes #13
This commit is contained in:
Kazhnuz 2021-01-03 10:34:41 +01:00
parent 85034163a7
commit 6632203fdf

View file

@ -1,12 +1,9 @@
<div class="card card-primary">
<div class="card-header"><i class="fa fa-folder"></i> Archives</div>
<div class="card-menu">
<?php
wp_get_archives( array(
'type' => 'yearly',
'echo' => 1,
'order'=> 'ASC'
) );
?>
<div class="card-body">
<select class="card-select" name="archive-dropdown" onChange='document.location.href=this.options[this.selectedIndex].value;'>
<option value=""><?php echo attribute_escape(__('Selection d\'une année…')); ?></option>
<?php wp_get_archives('type=yearly&format=option&show_post_count=1'); ?>
</select>
</div>
</div>