on-internet
← Community

How can I fill the gaps on the Shopify collection page when I hide or exclude products?

Stack Overflow ·

The first page is not filled entirely, but it already created other pages after excluding/hidding particular taged products. {% for product in collection.products %} {% if product.tags contains 'hideProd' %}{% continue %}{% endif %} <!-- your product grid item --> {% endfor %} Gaps should fill. For example, if there are 100 products in a collection and the pagination is set to 5 pages (with 20 products per page), but 20 products are excluded or hidden, the pagination should adjust to display only 4 pages.

Comments

Sign in or sign up to comment and upvote.

No comments yet.