All posts by tag

Is there a way to loop through every tag and then print all entries with that tag below it? i.e. the /tagged/example page but with every tag and its entries, without having to specify each one individually.

3 replies

Yes, there is a way to list all the tags used and all the entries associated with each tag! Here is a brief example:


<ul>
{{#all_tags}}
  <li>
    <a href="/tagged/{{slug}}">{{tag}}</a>
    <ul>
    {{#entries}}
      <li><a href="{{{url}}}">{{title}}</a></li>
    {{/entries}}
    </ul>
  </li>
{{/all_tags}}
</ul>

Please let me know if you would like me to elaborate about the full process required to add this to your template.

Answered 2 years ago · Improve this answer

I believe this is what I'm looking to do, but on a separate page. I would like a page with just my posts tagged [Links]. I would need a file in my Pages folder to be an .html, correct? When I make the page and .html file instead of .md, it does not show up anywhere on my site.

Answered 2 years ago · Improve this answer

You can't include template code in a page/post inside your blog's folder. If you want to use the template engine, you need to create a new view within your template.

Either way – if you want to have a link on your menu to page which shows all the posts tagged Links I would recommending adding a link to /tagged/links to your menu. Does that solve the issue?

Answered 2 years ago · Improve this answer

Markdown allowed
Question or feedback?
Contact us

Tags

developers 28 questions bug 14 questions posts 9 questions resolved 7 questions request 6 questions google-drive 5 questions configure 4 questions pages 3 questions added 3 questions meta 3 questions More tags →
Subscribe for changes
RSS Feed of latest questions