# Voeg een tag toe aan alle onderwerpen in een categorie

**URL:** https://meta.discourse.org/t/add-a-tag-to-all-topics-in-a-category/263650
**Category:** Support
**Created:** [3 mei 2023 om 08:56 UTC](https://meta.discourse.org/t/add-a-tag-to-all-topics-in-a-category/263650 "2023-05-03T08:56:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [3 mei 2023 om 08:56 UTC](https://meta.discourse.org/t/add-a-tag-to-all-topics-in-a-category/263650/1 "2023-05-03T08:56:39Z")

</div>

Hey!

We’re in the process of switching our use of [User Portfolio](https://meta.discourse.org/t/user-portfolio/156678) from category based to tag-based, to give our users more control over which work is showcased. To make this a smooth transition, we’d like to add the #portfolio tag to all posts in our artwork categories. This touches on a LOT of topics, so I’d need a way to automate this can someone point me in the right direction?

Some additional information:

- This tag is currently not in use.
- We’ll be increasing the maximum number of tags per topic from 5 to 6 before running this script, so we won’t have to drop any existing topic tags.

Thanks!

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [3 mei 2023 om 10:02 UTC](https://meta.discourse.org/t/add-a-tag-to-all-topics-in-a-category/263650/2 "2023-05-03T10:02:17Z")

</div>

Did you look at [Administrative Bulk Operations](https://meta.discourse.org/t/administrative-bulk-operations/118349)?..

Oh. Here!

> [@Administrative Bulk Operations](https://meta.discourse.org/t/administrative-bulk-operations/118349/1):
>
> ## Bulk Tag All Topics Within a Category
> 
> * * *
> 
> Template: `rake tags:bulk_tag_category["<tag>|<tag>",<category_id>]`  
> This would be particularly useful when trying to convert a category to a tag.

---

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [3 mei 2023 om 10:07 UTC](https://meta.discourse.org/t/add-a-tag-to-all-topics-in-a-category/263650/3 "2023-05-03T10:07:36Z")

</div>

NICE! That’s exactly what I need, thanks Jay!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2 juni 2023 om 10:07 UTC](https://meta.discourse.org/t/add-a-tag-to-all-topics-in-a-category/263650/4 "2023-06-02T10:07:51Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
