How can I modify code to query product tags by specific letters?

How can I modify code to query product tags by specific letters?

earthtoplanet
Explorer
46 6 8

Hello,

 

I'm trying to create a directory of every product tag used on my site. I currently have nearly 3000 tags and Shopify limits tag queries to 1000 tags.

 

Currently, I have a directory which lists the first 1000 tags: https://earthtoplanet.com/pages/cartoon-directory 

 

It uses this custom liquid code:

<div class="page-width page-width--narrow">
{% assign collectionAllTags = collections.all.tags %}
{% for tag in collectionAllTags %}
<li><a href="/collections/all/{{ tag | handle }}">{{ tag }}</a></li>
{% endfor %}
</div>

 

Is there a way I can modify this code to only query tags beginning with letters A, B, C, D?

 

If so, I think I can create multiple pages showing ALL of the tags by breaking them up into smaller groups.

 

Thanks for your insight or alternative solutions for showing all of the site's product tags.

Replies 0 (0)