Archive: 2008 August 13

Better Tags

By Richard X. Thripp at 2008-08-13T00:06:00Z in News, with these tags: links, pages, posts, stats, tags, 0 Comments. 155 words.

I changed the code that displays the tag list for each post. It looks like this now:

<?php $posttags = get_the_tags(); if ($posttags) { echo ‘with these tags: ‘; { foreach($posttags as $tag) { if ($tag->count > 1) echo ‘<a href=”‘.get_tag_link($tag).’” title=”‘.$tag->count.’ entries”>’.$tag->name.’</a>, ‘; else echo $tag->name.’, ‘; } } } ?>

What does that mean? Now, if the post is the only post with that tag, no link is displayed. Your readers’ time will not be wasted any longer. If there’s more than one tagged post, the link is shown like before, but now the number of entries is shown as …