WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

  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?


share|improve this question

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.