The community member is confirming that the approach of adding collections with different tags in separate sections and using visibility conditions to filter the desired posts is a best practice. The comments discuss some additional considerations, such as handling cases where the desired tag is not the first one, and the potential issue of not having enough posts of each type to fill the grid. Another community member suggests making separate API calls for each tag, but notes that this may not be suitable for an actual blog post due to the additional loading time. Overall, the community members agree that the proposed approach is a valid solution.
I just want to confirm this is the best way to do this. If I am pulling in a collection of posts, but I want to display posts of a specific tag in one section of the page and then posts of another tag in another section. I would simply add the collections in different sections and put a visibility condition to filter for the items i want? It works. Just confirming this is best practice.
You're looking for the first tag. What if publication is the second tag? I recall in a previous thread I showed a way to access the "primary tag" which I suppose you can set in Ghost.
There's no guarantee you'll have enough posts of each type to fill up your grid. This won't be a problem until you scale though and have more than however many is the limit in their api (e.g. you have 200 posts in Ghost but only get 100 at a time via the API).
The API is very fast and the overview page can afford an extra 100 ms or so of loading time. I wouldnt take that trade off on an actual blog post though