# Internal Tags show up in post

**URL:** <https://forum.ghost.org/t/internal-tags-show-up-in-post/36148>\
**Category:** Themes\
**Created:** [February 7, 2023, 5:01pm UTC](https://forum.ghost.org/t/internal-tags-show-up-in-post/36148 "2023-02-07T17:01:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![codysechelski](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@codysechelski](https://forum.ghost.org/u/codysechelski)\
**Post date:** [February 7, 2023, 5:01pm UTC](https://forum.ghost.org/t/internal-tags-show-up-in-post/36148/1 "2023-02-07T17:01:09Z")

</div>

I am working on customizing one of the default themes and I’m seeing something strange.

When I use `{{tags}}` in my post.hbs, I get what I expect, all of the public tags. However. if I do:

```plaintext
{{#each tags}}
  <a class="gh-article-tag" href="{{this.url}}" style="--tag-color: {{this.accent_color}}">{{this.name}}</a>
{{/each}}

```

I am getting back public AND internal tags. Any way to add a visibility filter when using tags in a loop like this. I tried

```plaintext
{{#each tags visibility="public"}}

```

but it did not have any affect. Here’s the actual code. For debugging I added `{{tags}}` and I’ve added `{{this.visibility}}` inside the loop. My end goal is to only have the loop.

```plaintext
<div class="all-tags">
  {{tags}}
  <hr />
  {{#each tags visibility="public"}}
    {{this.visibility}}
    <a class="gh-article-tag" href="{{this.url}}" style="--tag-color: {{this.accent_color}}">{{this.name}}</a>
  {{/each}}
</div>

```

and here’s how it looks. You can see above the `<hr>` tag, is `{{tags}}` and below the `<hr>` is where I am looping over `{{tags}}`

![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/4/7/47916329252612db029eb69f6972ae19a96c1345.png)

---

<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:** [February 7, 2023, 5:03pm UTC](https://forum.ghost.org/t/internal-tags-show-up-in-post/36148/2 "2023-02-07T17:03:52Z")

</div>

Gscan should be telling you not to use the each helper - Ghost uses `{{foreach}}`.

---

<div class="post-metadata">

**Author:** ![codysechelski](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@codysechelski](https://forum.ghost.org/u/codysechelski)\
**Post date:** [February 7, 2023, 5:12pm UTC](https://forum.ghost.org/t/internal-tags-show-up-in-post/36148/3 "2023-02-07T17:12:04Z")

</div>

Gotcha, thanks for quick reply @Hannah!

Yup, I changed it to a foreach and it works as expected. 😃
