Foreach attributes 'from' and 'to' are not targeting my posts

Hello everyone,

On my dev environment I currently have 10 test posts. When I use the foreach posts from=“2” to=6", my posts will show. However, if I decide to do something like foreach posts from=“7” to=“10” those last few posts will not appear. Anyone have any idea why this is the case?

Thank you!

:wave:t3: Might those posts be subscriber-only posts? If so, you should use visibility="all" attribute. {{#foreach visibility="all" from="7" to="10"}}

Was able to figure it out, I had to wrap the #foreach with a #get which for whatever reason was able to fetch the last few posts.

{{#get “posts” limit=“4” filter=“primary_tag:test-1” include=“tags”}}
{{#foreach posts}}
{{> “post-card”}}

Thanks for the reply though!

1 Like