• Resolved Kevin4fm

    (@kevin4fm)


    Does anyone know an easy way to display a mixed list of linked and unlinked 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’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! ?? ]

    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.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Mixed Linked And Unlinked Terms’ is closed to new replies.