Filter Expressions

On my home page, I would like to show the latest posts across two three different sections.

Section 1: Only shows the latest post. {{#get "posts" limit="1"}}

Section 2. Shows the 4 most recent posts but NOT the most recent (since that is already shown in section 1)

Section 3. Shows all the remaining posts in reverse chronological order.

How would I go about specifying the range of posts that I want as described in the example above. One idea I had for example with Section two was to query the five most recent posts with set one posts per page and then getting pages 2-5. Is there a better way?

I’m not sure I understand exactly what you’re after, so let me know. But this is what I’d do…

Use the default foreach loop (I’m assuming 15 posts per page):

Section 1
{{#foreach "posts" limit="1"}}

Section 2
{{#foreach "posts" from="2" to="5"}}

Section 3
{{#foreach "posts" from="6"}}

1 Like

Haha so simple. That’s exactly what I’m looking for. Thank you!

1 Like