# How to list all posts for any given tag?

**URL:** <https://talk.jekyllrb.com/t/how-to-list-all-posts-for-any-given-tag/1402>\
**Category:** Help\
**Created:** [January 25, 2018, 4:36pm UTC](https://talk.jekyllrb.com/t/how-to-list-all-posts-for-any-given-tag/1402 "2018-01-25T16:36:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [January 25, 2018, 5:10pm UTC](https://talk.jekyllrb.com/t/how-to-list-all-posts-for-any-given-tag/1402/2 "2018-01-25T17:10:12Z")

</div>

you want a list of each tag, with that tags posts below it?  
here is what I have to do that, there is some other stuff going on but I’ll leave it in there. I haven’t built this site in quite a while but it should still work.

this is this page: [http://ephotopros.com/tags/](http://ephotopros.com/tags/)

```auto

{% assign sorted_tags = site.tags | sort %}
{% for tag in sorted_tags %}
{% assign vids = tag[1] | sort %}

{% if vids != empty %}

  <h2 id="{{tag[0] | uri_escape | downcase}}">{{tag[0]}}</H2>
     <p>
      {% for p in vids %}
     <a href="/{{p.type | downcase}}/"><img src="/assets/img/{{p.type | downcase}}.png" alt="{{p.type}}" title="{{p.type}}"/></a> <a href="{{ p.url }}">{{ p.title }}</a> ({{p.type}}/{{p.category}}) &raquo; <span class="entry-date"><time datetime="{{ p.date | date_to_xmlschema }}" itemprop="datePublished">{{ p.date | date: "%B %d, %Y" }}</time></span>
     <br />
      {% endfor %}
    </p>
  
{% endif %}

{% endfor %}

```

---

_[View the full topic](https://talk.jekyllrb.com/t/how-to-list-all-posts-for-any-given-tag/1402)._
