Sorry if this has already been asked, but I am attempting to limit a list of tags to one category, in a couple different spots on my web page. I have this code:
<?php
$tags = get_tags();
$tags_count = count($tags);
$percolumn = ceil($tags_count / 3);
for ($i = 0;$i < $tags_count;$i++):
if ($i < $percolumn):
$tag_left .= '
<li><a href="'. get_tag_link($tags[$i]->term_id) . '"rel="tag">' . $tags[$i]->name .'</a></li>
' . "\n";
elseif ($i >= $percolumn && $i < $percolumn*2):
$tag_mid .= '
<li><a href="'. get_tag_link($tags[$i]->term_id) . '"rel="tag">' . $tags[$i]->name .'</a></li>
' . "\n";
elseif ($i >= $percolumn*2):
$tag_right .= '
<li><a href="'. get_tag_link($tags[$i]->term_id) . '"rel="tag">' . $tags[$i]->name .'</a></li>
' . "\n";
endif;
endfor;
?>
<ul>
<?php echo $tag_left; ?>
</ul>
<ul>
<?php echo $tag_mid; ?>
</ul>
<ul>
<?php echo $tag_right; ?>
</ul>
How can I leverage this, and restrict the query to just one category.