Skip to content

Instantly share code, notes, and snippets.

@johnathan-sewell
Created July 25, 2011 21:38
Show Gist options
  • Save johnathan-sewell/1105298 to your computer and use it in GitHub Desktop.
Save johnathan-sewell/1105298 to your computer and use it in GitHub Desktop.
Wordpress tag cloud as multiple HTML lists
<?php
$mytags = get_tags() ;
if ($mytags) {
echo '<ul>';
for ($x = 0; $x <= count($mytags); $x++) {
if (($x > 0) && ($x % 3 == 0)) echo '</ul><ul>';
echo '<li>';
echo '<a href="' . get_tag_link($mytags[$x]->term_id) . '">' . $mytags[$x]->name . '</a>';
echo '</li>';
}
echo '</ul>';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment