Link from tags to tag pages displaying all posts with that tag

you haven’t shown in your code how you get $tag, therefore I include my version (the code has to be in the loop):

<?php $tags = get_the_tags(); 
if( $tags ) foreach( $tags as $tag ) { ?>
<a href="https://wordpress.stackexchange.com/questions/30250/<?php echo get_tag_link($tag->term_id); ?>"><?php echo $tag->name; ?></a>
<?php break; } ?>

http://codex.wordpress.org/Function_Reference/get_the_tags

Leave a Comment

tech