PHP: List All Tags

Removed from my sitemap. Lists all tags.

<div class="sitemap-col">
	<h2><?php esc_html_e('Tags','k0nslified'); ?></h2>
	<ul id="sitemap-tags">
	<?php $tags = get_tags();
		if ($tags) {
			foreach ($tags as $tag) {
			echo '<li><a href="' . esc_url( get_tag_link( $tag->term_id ) ) . '">' . esc_html( $tag->name ) . '</a></li> ';
			}
		} ?>
	</ul>
	</div> <!-- end .sitemap-col -->

Leave a Reply

Your email address will not be published. Required fields are marked *