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
Yes, you can show a limited number of tags at anyplace in your ghost themes. Just control tags using limit="all"
.
{{#get "posts" limit="5"}}
{{/get}}
I have used here number 5 for showing tags. You can change with your number.
Thanks
Where am I supposed to put this?
You can put this where you want to show your posts.
{{#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}}">»</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