How to compare dates in Shopify?
In Shopify, the dates are strings so you can’t compare strings in the usual way. With Shopify liquid, you have to use the %s date filter to convert the date time to Unix epoch...
In Shopify, the dates are strings so you can’t compare strings in the usual way. With Shopify liquid, you have to use the %s date filter to convert the date time to Unix epoch...
Are you want to add days to date? Here is the solution to add days to the current date or desired date using Shopify liquid. Add days to date The following source code will...
The below liquid code help you extract all images from an article.
1 2 3 4 5 6 7 8 9 10 11 12 | {% assign article_content = article.content | escape %} {% if article_content contains '<img' %} {% assign article_content = article_content | split: '<img src="' %} {% for all_img in article_content %} {% if forloop.index != 1 %} {% assign a_img = all_img | escape %} {% assign a_img = a_img | split: '&' %} <img src="{{ a_img[0] }}"> {% endif %} {% endfor %} {% else %} {% endif %} |
You can use it to create a slideshow gallery.