Created
June 15, 2019 07:48
-
-
Save thetwopct/bc92882a486712378bad3235e3b4b8ea to your computer and use it in GitHub Desktop.
Display all tags for a post with permalinks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$tags = get_tags(); | |
if ($tags) { | |
echo '<ul class="tags">'; | |
foreach ($tags as $tag) { | |
echo '<li> | |
<a href="' . get_tag_link( $tag->term_id ) . '" | |
title="' . sprintf( "View posts tagged with %s", $tag->name) . '">' . $tag->name .'</a> | |
</li>'; | |
} | |
echo '</ul>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment