# Getting tags to work in an archive page

**URL:** <https://forums.realmacsoftware.com/t/getting-tags-to-work-in-an-archive-page/57966>\
**Category:** RapidWeaver Elements\
**Created:** [October 25, 2026, 2:31pm UTC](https://forums.realmacsoftware.com/t/getting-tags-to-work-in-an-archive-page/57966 "2026-10-25T14:31:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thominator](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/thominator/32/35233_2.png) [@thominator](https://forums.realmacsoftware.com/u/thominator)\
**Post date:** [October 25, 2026, 2:31pm UTC](https://forums.realmacsoftware.com/t/getting-tags-to-work-in-an-archive-page/57966/1 "2026-10-25T14:31:17Z")

</div>

Working on a new site, I had a series of blog posts that had different tags. On an archive page, I wanted a user to be able to click All or on an individual Tag Name to show just the articles that had that tag. Turns out I couldn’t do that the way I thought with the CMS. Here’s what I ended up doing:

**1. Create a `tags` folder (this was the gotcha)**  
The Tag List showed “No tags found” until I added a `tags` folder in the CMS, alongside the posts folder:

```auto
cms/
  posts/
  tags/
    apple.md
    mac.md
    ...

```

Each tag used in a post needs its own `.md` file, named after the tag. Mine only contain:

yaml

```yaml
---
name: mac
title: mac
---

```

You may not need both fields, but this works. **If you add a new tag to a post, add its file here too, or it won’t appear in the Tag List.**

**2. Set up the Collection**  
On the Archive page’s Collection, go to Filters and set **Tags** to **From URL**. The Collection then reads `?tags=whatever` from the page address.

**3. Add the Tag List**

- Place a Tag List above the Collection, not inside the Collection’s Before zone.
- Set **Folder** to your posts folder.
- Leave **Tag Page** empty.
- In the Tag List’s item drop zone, add a Flex with its link set to plain text `?tags={{tag.name}}`, and inside it a Text with `{{tag.name}} ({{tag.count}})`.

Because the link is relative, each tag reloads the same page with the filter applied.

**4. Add an “all” button**  
Add a Flex linked to the Archive page itself, containing a Text with “all”. This clears the filter.

**5. Put the buttons in one row**  
By default the Tag List stacks one tag per row. To get a single wrapping row:

- Put the “all” Flex and the Tag List together inside a Flex set to Row and Wrap, with Align Items set to Start.
- On the Tag List, add these classes (Advanced → Classes): `flex-1 [&_.grid]:!flex [&_.grid]:!flex-wrap [&_.grid]:!gap-2`
- On each pill Flex, add: `inline-flex w-fit border border-current rounded-full px-3 py-1 text-sm hover:opacity-70`

Tested in Elements 3.1.3 with CMS v2.

---

<div class="post-metadata">

**Author:** ![WeaverPixel](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/weaverpixel/32/25453_2.png) [@WeaverPixel](https://forums.realmacsoftware.com/u/WeaverPixel)\
**Post date:** [October 26, 2026, 8:44am UTC](https://forums.realmacsoftware.com/t/getting-tags-to-work-in-an-archive-page/57966/2 "2026-10-26T08:44:08Z")

</div>

Thanks for sharing that @thominator 🙏  
I was trying to do this a couple of times but always failed.
