<?php

$args = array(
        'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 999,
        'format' => 'array', 'orderby' => 'name', 'order' => 'ASC',
        'exclude' => '', 'include' => '');

$tags = get_tags($args);

?>

<div class="card card-primary">
  <div class="card-header"><i class="fa fa-tags" aria-hidden="true"></i> Tags</div>
  <div class="card-body">
    <form action="<?php bloginfo('url'); ?>" method="get">
      <select class="card-select select" id="select-of-tags" name="tag" onchange="if(this.selectedIndex){location.href=(this.options[selectedIndex].value)}">
        <option value="">Selection d'un tag...</option>
        <?php foreach ($tags as $tag) {?>
        <option value="<?php bloginfo('url'); ?>/tag/<?php echo $tag->slug ?>"><?php echo $tag->name ?></option>
        <?php } ?>
      </select>
    </form>
  </div>
</div>
