Skip to content

Instantly share code, notes, and snippets.

@halfempty
Created June 10, 2014 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halfempty/b9c54bd5f2eec7f3dddd to your computer and use it in GitHub Desktop.
Save halfempty/b9c54bd5f2eec7f3dddd to your computer and use it in GitHub Desktop.
showalltags with count
<?php
function showalltags() {
$tags = get_tags();
$html;
foreach ($tags as $tag){
$tag_link = get_tag_link($tag->term_id);
$html .= "<a href='{$tag_link}' title='{$tag->name} Tag' class='{$tag->slug} count{$tag->count}'>";
$html .= "{$tag->name}</a>";
}
echo $html;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment