This seems to work for all types of filters, such as category or other front-material variables - of type type, so I can have type: article or type: video, and this seems to only get tags from one of them, if I put it in the "where" part.
{% assign sorted_tags = site.tags | sort %} {% for tag in sorted_tags %} {% assign zz = tag[1] | where: "category", "Photoshop" | sort %} {% if zz != empty %} <li><span class="tag">{{ tag[0] }}</span> <ul> {% for p in zz %} <li><a href="{{ p.url }}">{{ p.title }}</a></li> {% endfor %} </ul> </li> {% endif %} {% endfor %}
zz is something that you can use to filter on the first tag [0], since all it has is the tag itself, so you can filter anything else with it. tag [1] has all other things.
I originally used if zz! = Null or if zz! = "", But none of them worked.
source share