Im trying to build our FAQ page and now im struggling with (I hope) last problem.
So I have common tags for Posts & Pages
Post 1 tagged as: Category 1, Account, Profile
Post 2: Category 2, Account
Page tagged to show posts from tags: Account
Problem is that I am not able to create page.hbs to show common posts for Page title (title because it’s called the same as tag) & tag equal Account.
So on page Category 1(tagged as Account) I display beides Post 1 and Post 2. I expect only to show Post 1.
Below is my page.hbs
:
{{!< default}}
{{> search-container}}
<div class="gh-main gh-outer" style="background-color: #F4F4F8">
<div id="featured-faq" class="gh-inner" style="margin-bottom: 65px">
<div class="d-flex flex-wrap" style="gap: 25px;">
{{#foreach tags as | this_tag|}}
<div class="col-12 col-md-5 flex-grow-1">
<header class="section-header">
<h2 class="section-title">
{{name}}
</h2>
</header>
{{#get "posts" limit="5" include="tags" filter="tags:{{slug}}"}}
<div class="topic-feed">
{{#foreach posts as | this_post|}}
{{> faq-featured-question-extended}}
{{/foreach}}
</div>
{{/get}}
<a class="get-more-qa d-flex justify-content-end" href="{{url}}">{{t "Look More"}}</a>
</div>
{{/foreach}}
</div>
</div>
{{/post}}
{{> other-contact-block}}
{{> back_button}}
</div>
I am not abe to use page slug or title in get posts filter.