Montar uma lista de tags no WordPress
Postado em 27 de agosto de 2010 por Henderson | Categorias: Posts, Tags | Tags: Lista de Tags, Nuvem de Tags | Sem comentários » | Comentar
Para montar lista de Tags no WordPress, use:
$tags = get_tags(); $html = '<div>'; foreach (get_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 .= '</div>'; echo $html;
Veja mais no site: http://codex.wordpress.org/Function_Reference/get_tags
Exibir nuvens de tags:
<?php wp_tag_cloud(); ?>
Veja mais: http://codex.wordpress.org/Template_Tags/wp_tag_cloud