display tags in a list code

<h3 style = “margin-left:42px; “> Filters </h3>

<?php

 

$tags = get_tags();

$html = ‘<div class=”z_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 .=”<br>”;

}

$html .= ‘</div>’;

echo $html; ?>

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s