enter image description here when I write this code {% if forloop.index % 10 == 0 %} why it is showing error? Please Help {% if forloop.index % 10 == 0 %} <div class="banner"> <p>This is a banner displayed after every 10 products!</p> </div> {% endif %} I've tried this code but it is not working Please help
Jese Leos
September 27, 2024
Verified user
I don't know much about shopify, but have you tried running the code like this? {% assign remainder = forloop.index | modulo:10 %} {% if remainder == 0 %} <div class="banner"> <p>This is a banner displayed after every 10 products!</p> </div> {% endif %}