Get all used tags

I try to get all tags from every Blogpost. When using the following code i only get those tags of the current post and not all the tags of all posts. Any ideas ?

// fetch all tags
$tags = $page->children()->visible()->pluck('tags', ',', true);

What do you mean by “all tags of the current post”? This code should go into the parent page template, e.g. blog.php, to be able to fetch the tags of the children, i.e. blogposts? Or if you want all tags of all blogposts below each article or in a sidebar, you should indicate the page in your code, e.g.

$tags = page('blog')->children()->visible()->pluck('tags', ',', true);

@texnixe thanks for your answer. Actually the code works. I made a mistake while setting up the content for a quick test. I named the Folders for my Blogposts 01-post, 02-post etc. instead of 01-post-1, 02-post-2 etc. So Kirby returned only the latest post. ups :smile: