<?php

$tags = get_terms(array(
	'taxonomy' => 'etiquettes',
	'hide_empty' => false,
));

?>

<section class="explore-tags">
	<div class="inner">
		<div class="explore-tags__titling">
			<h2 class="explore-tags__title">Tags</h2>
			<h3 class="explore-tags__subtitle">Explorer <br /> par Tags</h2>
		</div>
		<div class="tag-list">
			<?php foreach ($tags as $tag) : ?>
				<a href="<?php echo get_term_link($tag); ?>" class="tag-list__tag">
					<?php echo $tag->name; ?>
					<?php
					$svg_path = get_template_directory() . '/resources/img/carhop-fleche-lien-externe-full.svg';
					if (file_exists($svg_path)) {
						echo file_get_contents($svg_path);
					}
					?>
				</a>
			<?php endforeach; ?>
		</div>
	</div>
</section>