Show current tag
-
Hello,
I’m looking for a list of all tags with a special class on the current one.
I found this code which works great but I can’t manage to add the special class…
$tags = get_tags(); $html = '<div class="post_tags">'; foreach ( $tags as $tag ) { $tag_link = get_tag_link( $tag->term_id ); $html .= "<a href='{$tag_link}' title='{$tag->name} Tag' class='{$tag->slug}'>"; $html .= "{$tag->name}</a>"; } $html .= '</div>'; echo $html;Any help ?
Thanks a lot !
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Show current tag’ is closed to new replies.