Hi, I really like the way the Ease Theme has the ability to view 5 posts from tags. I have specific tags I want to display on the home page. Is there a way I can do this?
I tried to see if I could do this for one of my tags (“book”, so I wrote below in index.hbs (apologies for the bad code, but I’m not a programmer
All that happened was ALL the tags didn’t display. Is there a way I can test for specific tags and then perform actions based on the tag expression being true?
{{#get "tags" limit="all"}}
<div class="topic-feed">
{{#if "book" includeZero=false}}
<section class="topic">
<header class="topic-header">
<h2 class="topic-name">
<a href="{{url}}">{{name}}</a>
</h2>
</header>
{{#get "posts" order="published_at asc" filter="tag:{{slug}}" limit="5" as |featured|}}
<ul class="topic-article-feed">
{{#foreach featured}}
<li class="topic-article">
<h3 class="topic-article-title">
<a class="topic-article-link" href="{{url}}">
{{> "icons/chevron-right"}} {{title}}
</a>
</h3>
</li>
{{/foreach}}
</ul>
{{/get}}
<a class="topic-more" href="{{url}}">Show more →</a>
</section>
{{/if}}