Created
September 21, 2016 11:51
-
-
Save hsleonis/e910f3716ae60e48e0034e4f79366d1a to your computer and use it in GitHub Desktop.
Shopify break 50 blog post limit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Shopify has a limit of 50 post per page, but I needed an image gallery in Masonry style with all images. | |
So I've created different blogs for each type and added images as post featured image. | |
Thus I can upload unlimited images, broken down into separate blogs. | |
--> | |
{% assign gallery = "gallery-ss16, gallery-ss17, gallery-ss17-1" | split: ", " %} | |
{% for i in gallery %} | |
{% for article in blogs[i].articles %} | |
{% if article.image %} | |
<div class="grid-item {% for tag in article.tags %}{{tag}}{% endfor %}"> | |
<a class="grid-group" rel="{% for tag in article.tags %}{{tag}}{% endfor %}" href="{{ article.image.src | img_url: 'master' }}"> | |
<img src="{{ article.image.src | img_url: 'large' }}" /> | |
</a> | |
</div> | |
{% endif %} | |
{% endfor %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment