PHP: List All Tags

Removed from my sitemap. Lists all tags.

[php]
<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 –>
[/php]

Add a Comment

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