# Is there a way to show only some tags in ruby?

**URL:** <https://forum.ghost.org/t/is-there-a-way-to-show-only-some-tags-in-ruby/18894>\
**Category:** Themes\
**Created:** [December 14, 2020, 2:12pm UTC](https://forum.ghost.org/t/is-there-a-way-to-show-only-some-tags-in-ruby/18894 "2020-12-14T14:12:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anand\_Dvn](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@Anand\_Dvn](https://forum.ghost.org/u/Anand_Dvn)\
**Post date:** [December 14, 2020, 2:12pm UTC](https://forum.ghost.org/t/is-there-a-way-to-show-only-some-tags-in-ruby/18894/1 "2020-12-14T14:12:29Z")

</div>

In ruby theme we can see tags on side of the page…  
I want to show some tags only and not others …  
Is there a way to do it??  
Url : [https://treanches.digitalpress.blog](https://treanches.digitalpress.blog)

---

<div class="post-metadata">

**Author:** ![ENAMUL\_HAQUE](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/enamul_haque/32/16837_2.png) [@ENAMUL\_HAQUE](https://forum.ghost.org/u/ENAMUL_HAQUE)\
**Post date:** [December 15, 2020, 5:10pm UTC](https://forum.ghost.org/t/is-there-a-way-to-show-only-some-tags-in-ruby/18894/2 "2020-12-15T17:10:12Z")

</div>

Yes, you can show a limited number of tags at anyplace in your ghost themes. Just control tags using `limit="all"`.

```auto
{{#get "posts" limit="5"}}
{{/get}}

```

I have used here number 5 for showing tags. You can change with your number.

Thanks

---

<div class="post-metadata">

**Author:** ![Theodorico\_Carvalho](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/theodorico_carvalho/32/20707_2.png) [@Theodorico\_Carvalho](https://forum.ghost.org/u/Theodorico_Carvalho)\
**Post date:** [June 26, 2023, 9:46pm UTC](https://forum.ghost.org/t/is-there-a-way-to-show-only-some-tags-in-ruby/18894/3 "2023-06-26T21:46:38Z")

</div>

Where am I supposed to put this?

---

<div class="post-metadata">

**Author:** ![electronthemes](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/electronthemes/32/17842_2.png) [@electronthemes](https://forum.ghost.org/u/electronthemes)\
**Post date:** [June 27, 2023, 4:40am UTC](https://forum.ghost.org/t/is-there-a-way-to-show-only-some-tags-in-ruby/18894/4 "2023-06-27T04:40:30Z")

</div>

You can put this where you want to show your posts.

```auto
{{#get "posts" limit="5"}}
  {{#if posts}}
    {{#foreach posts}}
    <article class="{{post_class}}">
      <h2 class="post-title"><a href="{{url}}">{{title}}</a></h2>
      <p>{{excerpt words="26"}} <a class="read-more" href="{{url}}">&raquo;</a></p>
      <p class="post-footer">
        Posted by {{primary_author}} {{tags prefix=" on "}} at <time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time>
      </p>
    </article>
    {{/foreach}}
  {{/if}}
{{/get}}

```

You can learn about `foreach` from here: [Ghost Handlebars Theme Helpers: foreach](https://ghost.org/docs/themes/helpers/foreach/)
