Include tags in frontend


#1

Hi,

I read and applied the tips provided on https://getkirby.com/docs/cheatsheet/panel-fields/tags to add tags to my blog post,
But I am unable to find how to include the tags in the front end of my blogs,
any tips/code?

And is there also a plugin or code I can use to make the tags clickable and have their own page so all posts with that specific tag are displayed?


#2

You can use the split()method:

<?php
$tags = $page->tags()->split(',');
foreach($tags as $tag): ?>
  <?= $tag ?>
<?php endforeach ?>

Or if you want to build a link for filtering, see this thread:

Single blog entry: How to display its tags?