Tags show in tag menu even when they cannot exist in that category

This bug is in the context of tags that can only be used in a category or sub-category. In this exampleI have added a tag “testloungepublic” to the sub-category “Public” under the category “Lounge”.

As you might expect, when a post is added to this sub-category with the tag “testloungepublic” it does indeed show up in the tag list (but not until the tag is used). Clicking that tag takes you to a nicely bread-crumbed view of that tag under the sub-category. All good.

However, if I go to a completely different category that cannot host that tag, it will still show up in the tag menu. This is a bad affordance because, if clicked on, this tag can never have any posts in it.

I propose that the correct behaviour would be to hide the tags when there are no post it could show. Just as we hide the tag when the are no posts site wide. It seems that this behaviour is somewhat inconsistent.


Thanks for posting this @sampattuzzi. @codinghorror would be great for us if this could get some attention.

I’ve got a fix in progress.

It is getting late here so I will continue with the writing of tests tomorrow


You rock @tgxworld! Do you know how long it takes for these changes to filter down to the subscription product?

PR has been merged.

Usually within a week :slight_smile:

1 Like

That’s awesome. Can’t wait to see it working on our production site! :joy:

@tgxworld I finished the WIP. :slight_smile:

If some tags were restricted to a category, then the filter in all other categories would disappear.