Section1 “Latest news”: only the posts with the tag “Latest news”,
After section 1:
Section 2 “events”: only posts with the tags “events”,
And so on…
I used the has helper to filter just the posts and it work well
I put the limit amount of posts I want in each section as well,
But sometimes, when I create a new post with the tag “events”, it goes in the latest news section, deleting one post of the latest news section, even if I put the limit of posts in the “latest news” section,
Why?
All I need is that the posts with specific tag go in the right section and not in another,
Thanks for your answer, but I don’t want those sections in the navigation menu of my site,
But my site has the goal of a “news blog” and I need to put sections on the front page, as the New York Times for example, I need to put sections on the home page,
Like when I post something with a specific tag, it goes in the right section.
The problem I have here, is that when I post with a specific tag, it don’t go in the right section, even if I made html sections, and I don’t understand why,
First get the tags on the index page by using {{#get “tags”}}
Now within that get tags i just mention, do a for each tags loop. Cause you want to spread ALL the tags on the index, so you have to do a loop using {{#foreach tags}}
Now within that loop i just mention on step two, open a get the posts directive using {#get “posts”}}
Now within the get posts you have to another loop but this time to obtain all the posts like this: {{#foreach posts}} so you can spread all the posts, but specifically each of them within the specific tag section they belong.
Basically you have to do posts loop within a tag loop. Because first you call and do a loop for all the tags and also within each tag you do a loop to call all the posts.
The solution was simple, using the get helper as you said it too. @DavidDarnes help me find the error I committed trough this: I misplaced the foreach helper!