# Primary tag slug not working in certain context

**URL:** <https://forum.ghost.org/t/primary-tag-slug-not-working-in-certain-context/10593>\
**Category:** Developer help\
**Created:** [December 2, 2019, 5:12pm UTC](https://forum.ghost.org/t/primary-tag-slug-not-working-in-certain-context/10593 "2019-12-02T17:12:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lzeugin](https://avatars.discourse-cdn.com/v4/letter/l/f0a364/32.png) [@lzeugin](https://forum.ghost.org/u/lzeugin)\
**Post date:** [December 2, 2019, 5:12pm UTC](https://forum.ghost.org/t/primary-tag-slug-not-working-in-certain-context/10593/1 "2019-12-02T17:12:54Z")

</div>

I’m trying to show a list of posts with the tag “Popular” (which is not the first tag) and on this list I want it to show the primary tag of the post. If I use `{{reading_time}}` in the same context it works, but not with `{{primary_tag.name}}`. Why am I unable to grab the primary tag for the post in this context? It works in other contexts.

```auto
<div class="col-2">
    {{#get "posts" filter="tags:popular+featured:false" limit="5" }}
        <h2 class="section-title" style="margin-left: 0;">Popular <a href="/blog/tag/updates/" class="section-all">SEE ALL</a>
        </h2>
        <div class="popular-posts-block">
            {{#foreach posts}}
                <div class="popular-post-line row" onClick="window.location.href = '{{url}}';">
                    <div class="col-3-mob popular-post-image">
                        <a href="{{url}}">
                            <img class="popular-post-image"
                                 srcset="{{img_url feature_image size="s"}} 300w,
                                            {{img_url feature_image size="m"}} 600w,
                                            {{img_url feature_image size="l"}} 1000w,
                                            {{img_url feature_image size="xl"}} 2000w"
                                 sizes="(max-width: 1000px) 400px, 700px"
                                 src="{{img_url feature_image size="m"}}"
                                 alt="{{title}}"
                            />
                        </a>
                    </div>
                    <div class="post-card-content">
                        <a class="post-card-content-link popular-post-content-link" href="{{url}}">
                            <header class="post-card-header">
                                <p class="post-card-title popular-post-title">{{title}}</p>
                            </header>
                        </a>
                    </div>
                    <div class="popular-posts-tags col-3-mob">
                            <span class="popular-posts-tags"><b class="post-card-tag-name">{{primary_tag.name}}</b>
                    </div>
                </div>
            {{/foreach}}
        </div>
    {{/get}}
</div>

```

---

<div class="post-metadata">

**Author:** ![Hannah](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/hannah/32/22_2.png) [@Hannah](https://forum.ghost.org/u/Hannah)\
**Post date:** [December 4, 2019, 7:47pm UTC](https://forum.ghost.org/t/primary-tag-slug-not-working-in-certain-context/10593/2 "2019-12-04T19:47:14Z")

</div>

> [@lzeugin](#):
>
> {{#get “posts” filter=“tags:popular+featured:false” limit=“5” }}

If you want to fetch tags for the posts, as well as filter by tag, you’ll need to explicitly include them:

`{{#get "posts" filter="tags:popular+featured:false" include="tags" limit="5" }}`

More detail in the get helper docs:

> **[Ghost Handlebars Theme Helpers: get](https://ghost.org/docs/themes/helpers/get/)**
>
> Make custom queries to the Ghost API using the get helper and fetch publicly available data. Read more about Ghost themes! 👻
