Does anyone know a straightforward way to display a mixed list of linked and unlinked (custom) terms, dependent on whether there is more than one instance of a term being used?
i.e. I have an item that may have three or four terms within a taxonomy. Of these terms, two or three may have also been applied to other items, but one or more only to that item. I want to display a list of terms for the item where if the term is used for other items, it's a link to a list of these, but if the item is the only one with that term, it isn't a link. (Object being to not provide a link if that link will only show the one item already being viewed!)
Therefore I can't (I don't think) just use get_the_term_list because this provides a linked list of all terms, regardless of how many instances of a term there are. I've got something working using wp_get_object_terms where there's only one term from a custom taxonomy assigned to a post, but I need to do the same thing where there are multiple terms, some of which should be links and some not.
I'm sure it would be possible by working out some long and clever script, but I was wondering if anyone knows an easy way [ not that I'd object if someone has already worked out the long and complex script and can point me to it! :-) ] I guess an alternative would be a fairly complex script but defined as a function, so the script itself is only entered once and I can use something simple each time I need it, but learning how to create functions from scratch is a challenge I've not taught myself yet!
If it helps with understanding - i.e. I haven't explained myself as well as I thought! - you can see an example of the challenge here. The BP tag, for instance, links to a list of items tagged BP ... but the list consists only of the one item a visitor was already viewing. The surveys tag used further down, links to a list where the original item is only one of two with that term.
Any help / suggestions really appreciated! :-)