Skip to content

Instantly share code, notes, and snippets.

@themepaint
Last active August 29, 2015 14:27
Show Gist options
  • Save themepaint/bb67757ca1c9ee673d12 to your computer and use it in GitHub Desktop.
Save themepaint/bb67757ca1c9ee673d12 to your computer and use it in GitHub Desktop.
Tags List in Shortcode Final
add_shortcode('footer_tags',function(){
$html ='<div class="tagcloud">';
$tags = get_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} tag-link-29' style='font-size: 8pt;'>";
$html .= "{$tag->name}</a>";
}
$html .='</div>';
return $html;
})
// Reference Coex get_tags();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment