How do I hide tags that have only been used once?

I’m looking to modify my theme so that only tags that have been used more than once show up on the site.

Here’s my logic, feel free to fault any (and all) of it:

Read More
  1. There is no point in only using tags once. All the tag will do is link to a tag archive with one post.
  2. However, I’d still like to tag my first post about unicorns with unicorn.
  3. That way, when I post about unicorns for the second time, the tag will suddenly appear on both posts.

I know a bit about WordPress and how it works, but not enough to do this. Should it be a plugin? Is there a function option/parameter/thing I’ve missed that does this? I seem to remember a database field that counts the number of times a tag is used, how does that help?

Thanks!

Related posts

Leave a Reply

1 comment

  1. The filter term_links-post_tag passes …

    '<a href="' . $link . '" rel="tag">' . $term->name . '</a>'
    

    … as its only argument. You could extract the term name, count the associated posts and return an empty string if there is only one post. the_tags() will not print it then.

    Very hackish, maybe someone else will find a better solution.