teachPress
teachPress copied to clipboard
Hide entries in filter dropdown of tpcloud that produce no results
First of all, thanks for a great tool. We have noticed a minor point of confusion with tpclouds, though: When the shortcode contains a filter such as
[tpcloud tag="123"]
the list is filtered properly, but the filter dropdowns at the top of the list still contain all entries.
For example, say our complete list of publications contains a single one from the year 2000 but this does not have the tag 123, it (correctly) does not show up in the list but a visitor of our site could still select the year 2000 from the filter dropdown, which leads to an empty list.
It would be great if such entries would not even show up in the filter dropdowns.
Sidenote: We are using a tpcloud specifically to get that filter functionality and disable the actual cloud using show_tags_as="none".