Posted By

nathanlong on 10/16/10


Tagged

list wordpress tags li


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

beneberle


Display Wordpress tags as list items


 / Published in: PHP
 

  1. <?php $tags = get_tags();
  2. $html = '<ul class="post_tags">';
  3. foreach (get_tags() as $tag){
  4. $tag_link = get_tag_link($tag->term_id);
  5. $html .= "<li><a href='{$tag_link}' title='{$tag->name} Tag' class='{$tag->slug}'>";
  6. $html .= "{$tag->name}</a></li>";
  7. }
  8. $html .= '</ul>';
  9. echo $html;
  10. ?>

Report this snippet  

You need to login to post a comment.