Getting Collection Filter to Show All Tags Within Collection Not Just From Products On Page

New Member
1 0 0
   <li{% unless collection_tags contains compare_custom_tag %} class="hide" {% endunless %}>
            <div class="field label-checkbox{% if has_tag == true %} active{% endif %}">
              <input id="{{cat_item_down}}_{{custom_tag | handleize}}" type="checkbox" value="{{custom_tag | handleize}}" class="filter checkbox"{% if has_tag == true %} checked="checked"{% endif %} />
              <label for="{{cat_item_down}}_{{custom_tag | handleize}}" class="name">{{custom_tag | remove_first: cat_item | remove: '_'}}</label>
            </div>
          </li>

So above is a line from our sidebar-collection.liquid file that drives our collection filter. It seems that currently, for example if you go to our "All" Collection with constraint "Rings":

https://wholesale-jewelry-website.myshopify.com/collections/all?constraint=rings

The filters are grinded down and are reflective of just whats on page 1 under "Rings". If you go to page 2, more "Rings" populate, and the tags in the filter populate for those new items. I am wondering how can I have all the tags show up on the filter in Page 1, even if in theory those items/tags are on Page 2/3/4/5. 

Some people aren't seeing filters for rings on page 5, because of this. I figured out how to just show ALL my tag filter by remove class="hide" in the code above, but then I have the filters for all my products including Bracelets, etc. and then there's just too much. Can I use some object to just show all tags under each constraint as I get more specific? Rather than what's on the page?

 

I saw use of "collection.all_tags", but I'm assuming this won't necessarily work, because I'm using my starting point as an "All" collection. Any ideas how I can achieve this?

 

0 Likes