How can I output posts from a specific tag?

Sorry to ask, I seem to have forgotten and can’t seem to find it anymore.

How can I output posts from a specific tag?

So I basically want to do this:

{{#foreach posts limit="5"}}
       {{> "showcase-item"}}
{{/foreach}}

But I only want to show the posts with the tag “showcase”

How can I do this?

I’m currently using the get helper with the include attribute and a filter expression like so:

{{#get "posts" include="tags" filter="tag:home-about" as |about|}}
    {{!-- {{log about}} --}}
    {{#foreach about}}
    <div>
        <h1>{{title}}</h1>
        {{content}}
    </div>
    {{/foreach}}
    {{/get}}

I’m open to learning any different ways to do this, though. I understand that too many get helpers on one template slows down page speed.

1 Like

Thank you this works :D

1 Like