Ad

Shopify Call All Articles In Blog EXCEPT The First One

- 1 answer

I am building a fancy blog page for my client. They want the first blog post shown full width with a bunch of other cool things showing, then they want the other posts displayed below in order they came out.

I have the fancy part worked out, but when I put the rest of the blog posts below that one, the first one still comes up.

Logically this makes sense because I am using {% for article in blog.articles %} to call the posts, but is there any way I can skip just the first post when calling all the other posts for the blog?

Thanks!

Ad

Answer

Shopify have an offset filter.

You can read more on it here: https://help.shopify.com/themes/liquid/tags/iteration-tags#offset

To sum it up your code will become {% for article in blog.articles offset: 1 %}

Ad
source: stackoverflow.com
Ad