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:
- There is no point in only using tags once. All the tag will do is link to a tag archive with one post.
- However, I’d still like to tag my first post about unicorns with
unicorn
. - 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!
The filter
term_links-post_tag
passes â¦â¦ 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.