Return to Snippet

Revision: 6184
at May 5, 2008 15:20 by Wiederkehr


Initial Code
<ul id="tag_grid">
    <?php       
      $tags = get_tags(array('orderby' => 'count', 'order' => 'DESC', 'number' => 25));
      
      foreach ($tags as $tag) {
        if ($tag->count < 5) {
          echo('<li class="tagclass1">');
        } else if ($tag->count < 15) {
          echo('<li class="tagclass2">');
        } else if ($tag->count < 25) {
          echo('<li class="tagclass3">');
        } else {
          echo('<li class="tagclass4">');
        }
      
      echo('<a href="' . get_tag_link($tag->term_id) . '" rel="tag">' . $tag->name . "</a></li>\n");
      }
      ?>
    </ul>

Initial URL
http://www.positivespaceblog.com/archives/how-to-create-a-tag-grid-and-evolve-past-the-cloud/

Initial Description


Initial Title
Wordpress tag list with CSS classes

Initial Tags
wordpress

Initial Language
PHP